From 34fc68f20a6a341d5deb977d31a035b845bb995d Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 14 May 2020 21:28:09 +0200 Subject: [PATCH] libnm: drop unused internal function nm_setting_gendata_get_all_values() This function is not used nor does it seem useful. Either you only need the names (nm_setting_gendata_get_all_names()) or you need the names and values together (_nm_setting_gendata_get_all()). Getting the values without knowing the corresponding name makes little sense. If you need it, call _nm_setting_gendata_get_all() instead. --- libnm-core/nm-core-internal.h | 2 -- libnm-core/nm-setting.c | 27 --------------------------- 2 files changed, 29 deletions(-) diff --git a/libnm-core/nm-core-internal.h b/libnm-core/nm-core-internal.h index cc37e68df0..9a7f74db5a 100644 --- a/libnm-core/nm-core-internal.h +++ b/libnm-core/nm-core-internal.h @@ -334,8 +334,6 @@ GVariant *nm_setting_gendata_get (NMSetting *setting, const char *const*nm_setting_gendata_get_all_names (NMSetting *setting, guint *out_len); -GVariant *const*nm_setting_gendata_get_all_values (NMSetting *setting); - gboolean nm_setting_gendata_clear (NMSetting *setting, const char *optname); diff --git a/libnm-core/nm-setting.c b/libnm-core/nm-setting.c index 50a277d8b8..c215b5cb58 100644 --- a/libnm-core/nm-setting.c +++ b/libnm-core/nm-setting.c @@ -2524,33 +2524,6 @@ nm_setting_gendata_get_all_names (NMSetting *setting, return names; } -/** - * nm_setting_gendata_get_all_values: - * @setting: the #NMSetting - * - * Gives the number of generic data elements and optionally returns all their - * key names and values. This API is low level access and unless you know what you - * are doing, it might not be what you want. - * - * Returns: (array zero-terminated=1) (transfer none): - * A %NULL terminated array of #GVariant. If no data is present, this returns - * %NULL. The returned array and the variants are owned by %NMSetting and might be invalidated - * soon. The sort order of nm_setting_gendata_get_all_names() and nm_setting_gendata_get_all_values() - * is consistent. That means, the nth value has the nth name returned by nm_setting_gendata_get_all_names(). - * - * Since: 1.14 - **/ -GVariant *const* -nm_setting_gendata_get_all_values (NMSetting *setting) -{ - GVariant *const*values; - - g_return_val_if_fail (NM_IS_SETTING (setting), NULL); - - _nm_setting_gendata_get_all (setting, NULL, &values); - return values; -} - void _nm_setting_gendata_to_gvalue (NMSetting *setting, GValue *value)