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-glib | |
| 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-glib')
| -rw-r--r-- | libnm-glib/libnm-glib-test.c | 5 | ||||
| -rw-r--r-- | libnm-glib/libnm_glib.c | 6 |
2 files changed, 5 insertions, 6 deletions
diff --git a/libnm-glib/libnm-glib-test.c b/libnm-glib/libnm-glib-test.c index 7dc6823e20..da3bc5f6d9 100644 --- a/libnm-glib/libnm-glib-test.c +++ b/libnm-glib/libnm-glib-test.c @@ -38,6 +38,7 @@ #include "nm-active-connection.h" #include "nm-vpn-connection.h" #include "nm-setting-ip4-config.h" +#include "nm-glib-compat.h" static gboolean test_wireless_enabled (NMClient *client) @@ -392,9 +393,7 @@ main (int argc, char *argv[]) { NMClient *client; -#if !GLIB_CHECK_VERSION (2, 35, 0) - g_type_init (); -#endif + nm_g_type_init (); client = nm_client_new (); if (!client) { diff --git a/libnm-glib/libnm_glib.c b/libnm-glib/libnm_glib.c index fed8016066..7acfcc95a3 100644 --- a/libnm-glib/libnm_glib.c +++ b/libnm-glib/libnm_glib.c @@ -32,6 +32,8 @@ #include "NetworkManager.h" #include "libnm_glib.h" +#include "nm-glib-compat.h" + #define DBUS_NO_SERVICE_ERROR "org.freedesktop.DBus.Error.ServiceDoesNotExist" @@ -495,9 +497,7 @@ libnm_glib_init (void) { libnm_glib_ctx *ctx = NULL; -#if !GLIB_CHECK_VERSION (2, 35, 0) - g_type_init (); -#endif + nm_g_type_init (); if (!g_thread_supported ()) g_thread_init (NULL); |
