diff options
Diffstat (limited to 'libnm-core')
-rw-r--r-- | libnm-core/nm-connection.c | 6 | ||||
-rw-r--r-- | libnm-core/nm-keyfile-reader.c | 2 | ||||
-rw-r--r-- | libnm-core/nm-setting-bond.c | 2 | ||||
-rw-r--r-- | libnm-core/nm-setting-ip-config.c | 4 | ||||
-rw-r--r-- | libnm-core/nm-setting-user.c | 2 | ||||
-rw-r--r-- | libnm-core/nm-setting-vpn.c | 4 | ||||
-rw-r--r-- | libnm-core/nm-setting-wired.c | 2 | ||||
-rw-r--r-- | libnm-core/nm-setting.c | 6 | ||||
-rw-r--r-- | libnm-core/nm-utils.c | 10 | ||||
-rw-r--r-- | libnm-core/tests/test-general.c | 4 |
10 files changed, 21 insertions, 21 deletions
diff --git a/libnm-core/nm-connection.c b/libnm-core/nm-connection.c index d5e28f7b3e..5d03295edc 100644 --- a/libnm-core/nm-connection.c +++ b/libnm-core/nm-connection.c @@ -587,7 +587,7 @@ nm_connection_diff (NMConnection *a, if (a == b) return TRUE; - diffs = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_hash_table_destroy); + diffs = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, (GDestroyNotify) g_hash_table_destroy); /* Diff A to B, then B to A to capture keys in B that aren't in A */ if (diff_one_connection (a, b, flags, FALSE, diffs)) @@ -1370,7 +1370,7 @@ nm_connection_verify_secrets (NMConnection *connection, GError **error) * @parameters: (allow-none) (element-type utf8 gpointer): a #GHashTable with * normalization parameters to allow customization of the normalization by providing * specific arguments. Unknown arguments will be ignored and the default will be - * used. The keys must be strings, hashed by g_str_hash() and g_str_equal() functions. + * used. The keys must be strings compared with g_str_equal() function. * The values are opaque and depend on the parameter name. * @modified: (out) (allow-none): outputs whether any settings were modified. * @error: location to store error, or %NULL. Contains the reason, @@ -2716,7 +2716,7 @@ nm_connection_get_private (NMConnection *connection) priv, (GDestroyNotify) nm_connection_private_free); priv->self = connection; - priv->settings = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_object_unref); + priv->settings = g_hash_table_new_full (nm_str_hash, g_str_equal, NULL, g_object_unref); } return priv; diff --git a/libnm-core/nm-keyfile-reader.c b/libnm-core/nm-keyfile-reader.c index 0ac417cdb4..f40fe60f92 100644 --- a/libnm-core/nm-keyfile-reader.c +++ b/libnm-core/nm-keyfile-reader.c @@ -763,7 +763,7 @@ read_hash_of_string (GKeyFile *file, NMSetting *setting, const char *key) if (NM_IS_SETTING_USER (setting)) { gs_unref_hashtable GHashTable *data = NULL; - data = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); + data = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, g_free); for (iter = (const char *const*) keys; *iter; iter++) { gs_free char *to_free = NULL; char *value = NULL; diff --git a/libnm-core/nm-setting-bond.c b/libnm-core/nm-setting-bond.c index d12940f6f9..e85d1564ea 100644 --- a/libnm-core/nm-setting-bond.c +++ b/libnm-core/nm-setting-bond.c @@ -892,7 +892,7 @@ nm_setting_bond_init (NMSettingBond *setting) { NMSettingBondPrivate *priv = NM_SETTING_BOND_GET_PRIVATE (setting); - priv->options = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); + priv->options = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, g_free); /* Default values: */ nm_setting_bond_add_option (setting, NM_SETTING_BOND_OPTION_MODE, "balance-rr"); diff --git a/libnm-core/nm-setting-ip-config.c b/libnm-core/nm-setting-ip-config.c index 41ae0993f6..33664ae93a 100644 --- a/libnm-core/nm-setting-ip-config.c +++ b/libnm-core/nm-setting-ip-config.c @@ -593,7 +593,7 @@ nm_ip_address_set_attribute (NMIPAddress *address, const char *name, GVariant *v g_return_if_fail (strcmp (name, "address") != 0 && strcmp (name, "prefix") != 0); if (!address->attributes) { - address->attributes = g_hash_table_new_full (g_str_hash, g_str_equal, + address->attributes = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref); } @@ -1227,7 +1227,7 @@ nm_ip_route_set_attribute (NMIPRoute *route, const char *name, GVariant *value) && strcmp (name, "next-hop") != 0 && strcmp (name, "metric") != 0); if (!route->attributes) { - route->attributes = g_hash_table_new_full (g_str_hash, g_str_equal, + route->attributes = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref); } diff --git a/libnm-core/nm-setting-user.c b/libnm-core/nm-setting-user.c index 049607e146..526bbd2073 100644 --- a/libnm-core/nm-setting-user.c +++ b/libnm-core/nm-setting-user.c @@ -210,7 +210,7 @@ nm_setting_user_check_val (const char *val, GError **error) static GHashTable * _create_data_hash (void) { - return g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); + return g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, g_free); } /** diff --git a/libnm-core/nm-setting-vpn.c b/libnm-core/nm-setting-vpn.c index 6b42e0c7a6..343bd9aa30 100644 --- a/libnm-core/nm-setting-vpn.c +++ b/libnm-core/nm-setting-vpn.c @@ -722,8 +722,8 @@ nm_setting_vpn_init (NMSettingVpn *setting) { NMSettingVpnPrivate *priv = NM_SETTING_VPN_GET_PRIVATE (setting); - priv->data = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); - priv->secrets = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, destroy_one_secret); + priv->data = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, g_free); + priv->secrets = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, destroy_one_secret); } static void diff --git a/libnm-core/nm-setting-wired.c b/libnm-core/nm-setting-wired.c index 9d255e1d07..09ed8949d0 100644 --- a/libnm-core/nm-setting-wired.c +++ b/libnm-core/nm-setting-wired.c @@ -829,7 +829,7 @@ nm_setting_wired_init (NMSettingWired *setting) { NMSettingWiredPrivate *priv = NM_SETTING_WIRED_GET_PRIVATE (setting); - priv->s390_options = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); + priv->s390_options = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, g_free); /* We use GArray rather than GPtrArray so it will automatically be NULL-terminated */ priv->mac_address_blacklist = g_array_new (TRUE, FALSE, sizeof (char *)); diff --git a/libnm-core/nm-setting.c b/libnm-core/nm-setting.c index 9c8e53aeac..297887411d 100644 --- a/libnm-core/nm-setting.c +++ b/libnm-core/nm-setting.c @@ -95,7 +95,7 @@ _ensure_registered (void) { if (G_UNLIKELY (registered_settings == NULL)) { nm_g_type_init (); - registered_settings = g_hash_table_new (g_str_hash, g_str_equal); + registered_settings = g_hash_table_new (nm_str_hash, g_str_equal); registered_settings_by_type = g_hash_table_new (_nm_gtype_hash, _nm_gtype_equal); } } @@ -807,7 +807,7 @@ _nm_setting_new_from_dbus (GType setting_type, GVariant *entry, *entry_key; char *key; - keys = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); + keys = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, NULL); g_variant_iter_init (&iter, setting_dict); while ((entry = g_variant_iter_next_value (&iter))) { @@ -1359,7 +1359,7 @@ nm_setting_diff (NMSetting *a, } if (*results == NULL) { - *results = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); + *results = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, NULL); results_created = TRUE; } diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c index 52e320421e..c3001ab5d1 100644 --- a/libnm-core/nm-utils.c +++ b/libnm-core/nm-utils.c @@ -144,7 +144,7 @@ init_lang_to_encodings_hash (void) if (G_UNLIKELY (langToEncodings5 == NULL)) { /* Five-letter codes */ enc = (struct IsoLangToEncodings *) &isoLangEntries5[0]; - langToEncodings5 = g_hash_table_new (g_str_hash, g_str_equal); + langToEncodings5 = g_hash_table_new (nm_str_hash, g_str_equal); while (enc->lang) { g_hash_table_insert (langToEncodings5, (gpointer) enc->lang, (gpointer) enc->encodings); @@ -155,7 +155,7 @@ init_lang_to_encodings_hash (void) if (G_UNLIKELY (langToEncodings2 == NULL)) { /* Two-letter codes */ enc = (struct IsoLangToEncodings *) &isoLangEntries2[0]; - langToEncodings2 = g_hash_table_new (g_str_hash, g_str_equal); + langToEncodings2 = g_hash_table_new (nm_str_hash, g_str_equal); while (enc->lang) { g_hash_table_insert (langToEncodings2, (gpointer) enc->lang, (gpointer) enc->encodings); @@ -512,7 +512,7 @@ _nm_utils_strdict_from_dbus (GVariant *dbus_value, const char *key, *value; GHashTable *hash; - hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); + hash = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, g_free); g_variant_iter_init (&iter, dbus_value); while (g_variant_iter_next (&iter, "{&s&s}", &key, &value)) g_hash_table_insert (hash, g_strdup (key), g_strdup (value)); @@ -527,7 +527,7 @@ _nm_utils_copy_strdict (GHashTable *strdict) GHashTableIter iter; gpointer key, value; - copy = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); + copy = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, g_free); if (strdict) { g_hash_table_iter_init (&iter, strdict); while (g_hash_table_iter_next (&iter, &key, &value)) @@ -4861,7 +4861,7 @@ nm_utils_parse_variant_attributes (const char *string, g_return_val_if_fail (key_value_separator, NULL); g_return_val_if_fail (!error || !*error, NULL); - ht = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref); + ht = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref); while (TRUE) { gs_free char *name = NULL, *value = NULL; diff --git a/libnm-core/tests/test-general.c b/libnm-core/tests/test-general.c index 59af87d324..28724e7fd5 100644 --- a/libnm-core/tests/test-general.c +++ b/libnm-core/tests/test-general.c @@ -6098,7 +6098,7 @@ test_g_ptr_array_insert (void) static void test_g_hash_table_get_keys_as_array (void) { - GHashTable *table = g_hash_table_new (g_str_hash, g_str_equal); + GHashTable *table = g_hash_table_new (nm_str_hash, g_str_equal); guint length = 0; char **keys; @@ -6752,7 +6752,7 @@ test_route_attributes_format (void) gs_unref_hashtable GHashTable *ht = NULL; char *str; - ht = g_hash_table_new_full (g_str_hash, g_str_equal, + ht = g_hash_table_new_full (nm_str_hash, g_str_equal, NULL, (GDestroyNotify) g_variant_unref); str = nm_utils_format_variant_attributes (NULL, ' ', '='); |