diff options
author | Thomas Haller <thaller@redhat.com> | 2014-07-10 10:41:31 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-07-12 13:56:52 +0200 |
commit | 904e9614641fe8203a5f61abaa841b7d186a343b (patch) | |
tree | 110e2f0004e15246e38eae7c6bff0f7fca731141 /libnm-util | |
parent | 3a338521703dc8be1e0589684c734f870e2c0633 (diff) | |
download | NetworkManager-904e9614641fe8203a5f61abaa841b7d186a343b.tar.gz |
all: remove #if GLIB_CHECK_VERSION conditionals around g_type_init()
g_type_init() is now provided by nm-glib-compat.h as nm_g_type_init().
Diffstat (limited to 'libnm-util')
-rw-r--r-- | libnm-util/nm-param-spec-specialized.c | 4 | ||||
-rw-r--r-- | libnm-util/nm-setting-private.h | 2 | ||||
-rw-r--r-- | libnm-util/nm-setting.c | 4 | ||||
-rw-r--r-- | libnm-util/tests/test-setting-dcb.c | 4 |
4 files changed, 4 insertions, 10 deletions
diff --git a/libnm-util/nm-param-spec-specialized.c b/libnm-util/nm-param-spec-specialized.c index acb8aec335..11f957499e 100644 --- a/libnm-util/nm-param-spec-specialized.c +++ b/libnm-util/nm-param-spec-specialized.c @@ -953,9 +953,7 @@ main (int argc, char *argv[]) { DBusGConnection *bus; -#if !GLIB_CHECK_VERSION (2, 35, 0) - g_type_init (); -#endif + nm_g_type_init (); bus = dbus_g_bus_get (DBUS_BUS_SESSION, NULL); diff --git a/libnm-util/nm-setting-private.h b/libnm-util/nm-setting-private.h index 1b271d0c76..5e1122e810 100644 --- a/libnm-util/nm-setting-private.h +++ b/libnm-util/nm-setting-private.h @@ -101,7 +101,7 @@ gboolean _nm_setting_clear_secrets_with_flags (NMSetting *setting, /* Ensure the setting's GType is registered at library load time */ #define NM_SETTING_REGISTER_TYPE(x) \ static void __attribute__((constructor)) register_setting (void) \ -{ g_type_init (); g_type_ensure (x); } +{ nm_g_type_init (); g_type_ensure (x); } NMSetting *nm_setting_find_in_list (GSList *settings_list, const char *setting_name); diff --git a/libnm-util/nm-setting.c b/libnm-util/nm-setting.c index 35ae01daf8..39c1d22207 100644 --- a/libnm-util/nm-setting.c +++ b/libnm-util/nm-setting.c @@ -103,9 +103,7 @@ static void _ensure_registered (void) { if (G_UNLIKELY (registered_settings == NULL)) { -#if !GLIB_CHECK_VERSION (2, 35, 0) - g_type_init (); -#endif + nm_g_type_init (); _nm_value_transforms_register (); registered_settings = g_hash_table_new (g_str_hash, g_str_equal); registered_settings_by_type = g_hash_table_new (_nm_gtype_hash, _nm_gtype_equal); diff --git a/libnm-util/tests/test-setting-dcb.c b/libnm-util/tests/test-setting-dcb.c index 36192cd33a..8f0af2e6c1 100644 --- a/libnm-util/tests/test-setting-dcb.c +++ b/libnm-util/tests/test-setting-dcb.c @@ -308,9 +308,7 @@ int main (int argc, char **argv) g_test_init (&argc, &argv, NULL); -#if !GLIB_CHECK_VERSION (2, 35, 0) - g_type_init (); -#endif + nm_g_type_init (); success = nm_utils_init (&error); g_assert_no_error (error); |