[geocode-glib] Do not call g_type_init() if GLib >= 2.36
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geocode-glib] Do not call g_type_init() if GLib >= 2.36
- Date: Wed, 17 Apr 2013 23:21:55 +0000 (UTC)
commit 2b7b60e41b1e260f68710db11c1b0417ef78dba1
Author: Javier Jardón <javier jardon codethink co uk>
Date: Thu Apr 18 01:18:54 2013 +0200
Do not call g_type_init() if GLib >= 2.36
g_type_init has been deprecated since version 2.36.
The type system is now initialised automatically
geocode-glib/geocode-ip-server/geoip-lookup.c | 2 ++
geocode-glib/geocode-ip-server/geoip-update.c | 2 ++
geocode-glib/geocode-ip-server/test-geoipformat.c | 2 ++
geocode-glib/test-gcglib.c | 2 ++
geocode-glib/test-geoip.c | 2 ++
5 files changed, 10 insertions(+)
---
diff --git a/geocode-glib/geocode-ip-server/geoip-lookup.c b/geocode-glib/geocode-ip-server/geoip-lookup.c
index 1cc1dbf..6f0033f 100644
--- a/geocode-glib/geocode-ip-server/geoip-lookup.c
+++ b/geocode-glib/geocode-ip-server/geoip-lookup.c
@@ -420,7 +420,9 @@ main (void)
char *ipaddress = NULL;
const char *data;
+#if (!GLIB_CHECK_VERSION (2, 36, 0))
g_type_init ();
+#endif
g_print ("Content-type: text/plain;charset=us-ascii\n\n");
/* If the query string contains a Wi-Fi field, request
diff --git a/geocode-glib/geocode-ip-server/geoip-update.c b/geocode-glib/geocode-ip-server/geoip-update.c
index bc002d3..5d76433 100644
--- a/geocode-glib/geocode-ip-server/geoip-update.c
+++ b/geocode-glib/geocode-ip-server/geoip-update.c
@@ -158,7 +158,9 @@ main (int argc, char **argv)
{ NULL }
};
+#if (!GLIB_CHECK_VERSION (2, 36, 0))
g_type_init ();
+#endif
context = g_option_context_new ("- updates the city and country databases from Maxmind.");
g_option_context_add_main_entries (context, entries, NULL);
diff --git a/geocode-glib/geocode-ip-server/test-geoipformat.c
b/geocode-glib/geocode-ip-server/test-geoipformat.c
index f92bf04..5bca816 100644
--- a/geocode-glib/geocode-ip-server/test-geoipformat.c
+++ b/geocode-glib/geocode-ip-server/test-geoipformat.c
@@ -120,7 +120,9 @@ main (int argc, char **argv)
char *our_response, *freegeoip_response;
int ret;
+#if (!GLIB_CHECK_VERSION (2, 36, 0))
g_type_init ();
+#endif
g_test_init (&argc, &argv, NULL);
g_test_bug_base ("http://bugzilla.gnome.org/show_bug.cgi?id=");
diff --git a/geocode-glib/test-gcglib.c b/geocode-glib/test-gcglib.c
index 6251ebc..e90a1f7 100644
--- a/geocode-glib/test-gcglib.c
+++ b/geocode-glib/test-gcglib.c
@@ -435,7 +435,9 @@ int main (int argc, char **argv)
};
setlocale (LC_ALL, "");
+#if (!GLIB_CHECK_VERSION (2, 36, 0))
g_type_init ();
+#endif
g_test_init (&argc, &argv, NULL);
g_test_bug_base ("http://bugzilla.gnome.org/show_bug.cgi?id=");
diff --git a/geocode-glib/test-geoip.c b/geocode-glib/test-geoip.c
index a2a68f5..0295813 100644
--- a/geocode-glib/test-geoip.c
+++ b/geocode-glib/test-geoip.c
@@ -115,7 +115,9 @@ int main (int argc, char **argv)
};
setlocale (LC_ALL, "");
+#if (!GLIB_CHECK_VERSION (2, 36, 0))
g_type_init ();
+#endif
g_test_init (&argc, &argv, NULL);
g_test_bug_base ("http://bugzilla.gnome.org/show_bug.cgi?id=");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]