summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>2014-09-15 14:23:24 +0300
committerFrederic PAUT <fpaut@fpaut-MOBL2>2014-11-03 11:52:02 +0100
commit29a6a049d268442e17b785d57a53694ee8faf5f3 (patch)
tree212d4ad2c25c6706d57e07ea03fe318efaee267e
parentad02e60c057a7047760beec58a8257c4d0f1bcda (diff)
downloadneardal-29a6a049d268442e17b785d57a53694ee8faf5f3.tar.gz
neardal-29a6a049d268442e17b785d57a53694ee8faf5f3.tar.bz2
neardal-29a6a049d268442e17b785d57a53694ee8faf5f3.zip
Add neardal_g_strfreev().
-rw-r--r--lib/neardal_tools.c10
-rw-r--r--lib/neardal_tools.h1
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/neardal_tools.c b/lib/neardal_tools.c
index c312d54..6906586 100644
--- a/lib/neardal_tools.c
+++ b/lib/neardal_tools.c
@@ -1,7 +1,7 @@
/*
* NEARDAL (Neard Abstraction Library)
*
- * Copyright 2012 Intel Corporation. All rights reserved.
+ * Copyright 2012-2014 Intel Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 2
@@ -29,6 +29,14 @@
#include "neardal.h"
#include "neardal_prv.h"
+void neardal_g_strfreev(void **array, void *end)
+{
+ void **p = array;
+ for (; (void *) p < end; p++)
+ g_free(*p);
+ g_free(array);
+}
+
void neardal_g_variant_add_parsed(GVariant **v, const char *format, ...)
{
GVariantBuilder b;
diff --git a/lib/neardal_tools.h b/lib/neardal_tools.h
index 2807be7..ac66af4 100644
--- a/lib/neardal_tools.h
+++ b/lib/neardal_tools.h
@@ -71,6 +71,7 @@ errorCode_t neardal_tools_prv_add_dict_entry(GVariantBuilder *builder
, gsize valueSize
, int gVariantType);
+void neardal_g_strfreev(void **array, void *end);
void neardal_g_variant_add_parsed(GVariant **v, const char *format, ...);
void neardal_g_variant_dump(GVariant *data);
void *neardal_g_variant_get(GVariant *data, const char *key, const char *fmt);