summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-03-15 18:28:05 +0100
committerThomas Haller <thaller@redhat.com>2015-03-15 18:28:05 +0100
commitbfdebae658bce4d21d25a7e91f5169f8209d79d6 (patch)
treeb9e2e00cd41a4b5287b56bf6cdf47cdbe376f129
parentfbca10a9a63be8f63a9f43ed98945b53b5797a98 (diff)
downloadNetworkManager-bfdebae658bce4d21d25a7e91f5169f8209d79d6.tar.gz
Revert "libnm: add _nm_utils_hash_values_to_ptrarray() function"
This reverts commit fbca10a9a63be8f63a9f43ed98945b53b5797a98.
-rw-r--r--libnm-core/nm-core-internal.h1
-rw-r--r--libnm-core/nm-utils.c38
2 files changed, 0 insertions, 39 deletions
diff --git a/libnm-core/nm-core-internal.h b/libnm-core/nm-core-internal.h
index fafade8f51..86a301bd1b 100644
--- a/libnm-core/nm-core-internal.h
+++ b/libnm-core/nm-core-internal.h
@@ -94,7 +94,6 @@ guint32 _nm_setting_get_setting_priority (NMSetting *setting);
gboolean _nm_setting_get_property (NMSetting *setting, const char *name, GValue *value);
GSList * _nm_utils_hash_values_to_slist (GHashTable *hash);
-GPtrArray * _nm_utils_hash_values_to_ptrarray (GHashTable *hash, gboolean null_for_empty);
GHashTable *_nm_utils_copy_strdict (GHashTable *strdict);
diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c
index 81b9d82925..7e0c6d9217 100644
--- a/libnm-core/nm-utils.c
+++ b/libnm-core/nm-utils.c
@@ -484,44 +484,6 @@ _nm_utils_hash_values_to_slist (GHashTable *hash)
return list;
}
-/**
- * _nm_utils_hash_values_to_ptrarray:
- * @hash: a #GHashTable
- * @null_for_empty: if %TRUE, return %NULL for an empty hash.
- * Otherwise, return a non-NULL, empty array.
- *
- * Utility function to iterate over a hash table and return
- * it's values as a GPtrArray.
- *
- * Returns: (element-type gpointer) (transfer container): a newly allocated #GPtrArray
- * containing the values of the hash table. The caller must free the
- * returned array with g_ptr_array_unref(). The hash values are not owned
- * by the returned array.
- *
- * If @null_for_empty is True, this will return %NULL for an empty hash.
- **/
-GPtrArray *
-_nm_utils_hash_values_to_ptrarray (GHashTable *hash, gboolean null_for_empty)
-{
- GPtrArray *array = NULL;
- GHashTableIter iter;
- void *value;
- guint size;
-
- g_return_val_if_fail (hash, NULL);
-
- size = g_hash_table_size (hash);
- if (size > 0 || !null_for_empty) {
- array = g_ptr_array_sized_new (size);
- if (size > 0) {
- g_hash_table_iter_init (&iter, hash);
- while (g_hash_table_iter_next (&iter, NULL, &value))
- g_ptr_array_add (array, value);
- }
- }
- return array;
-}
-
GVariant *
_nm_utils_strdict_to_dbus (const GValue *prop_value)
{