[librest/wip/baedert/gtask: 10/25] Remove all GLIB_CHECK_VERSION uses



commit c6ff34df98f71446f6b7002058f6ce64d969b1d4
Author: Timm Bäder <mail baedert org>
Date:   Fri Apr 22 14:11:38 2016 +0200

    Remove all GLIB_CHECK_VERSION uses
    
    Where the checked version is < 2.36, which we now require

 examples/continuous-twitter.c   |    6 +-----
 examples/dump-xml.c             |    4 ----
 examples/get-flickr-favorites.c |    4 ----
 examples/lastfm-shout.c         |    4 ----
 examples/post-twitter-media.c   |    6 +-----
 examples/post-twitter.c         |    6 +-----
 examples/test-raw.c             |    4 ----
 examples/test-xml.c             |    4 ----
 rest-extras/test-runner.c       |    3 ---
 rest/rest-private.h             |    2 +-
 rest/test-runner.c              |    3 ---
 tests/custom-serialize.c        |    6 +-----
 tests/flickr.c                  |    4 ----
 tests/lastfm.c                  |    4 ----
 tests/oauth-async.c             |    4 ----
 tests/oauth.c                   |    4 ----
 tests/oauth2.c                  |    4 ----
 tests/proxy-continuous.c        |    3 ---
 tests/proxy.c                   |    4 ----
 tests/threaded.c                |    4 ----
 tests/xml.c                     |    4 ----
 21 files changed, 5 insertions(+), 82 deletions(-)
---
diff --git a/examples/continuous-twitter.c b/examples/continuous-twitter.c
index dc06bde..7a915e0 100644
--- a/examples/continuous-twitter.c
+++ b/examples/continuous-twitter.c
@@ -4,7 +4,7 @@
  *
  * Authors: Rob Bradford <rob linux intel com>
  *          Ross Burton <ross linux intel com>
- * 
+ *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU Lesser General Public License,
  * version 2.1, as published by the Free Software Foundation.
@@ -43,10 +43,6 @@ main (int argc, char **argv)
   char pin[256];
   GMainLoop *loop;
 
-#if !GLIB_CHECK_VERSION (2, 36, 0)
-  g_type_init ();
-#endif
-
   loop = g_main_loop_new (NULL, FALSE);
 
   /* Create the proxy */
diff --git a/examples/dump-xml.c b/examples/dump-xml.c
index f574cb5..e6ebd48 100644
--- a/examples/dump-xml.c
+++ b/examples/dump-xml.c
@@ -94,10 +94,6 @@ main (int argc, char **argv)
     return 1;
   }
 
-#if !GLIB_CHECK_VERSION (2, 36, 0)
-  g_type_init ();
-#endif
-
   if (!g_file_get_contents (argv[1], &data, &length, &error)) {
     g_printerr ("%s\n", error->message);
     g_error_free (error);
diff --git a/examples/get-flickr-favorites.c b/examples/get-flickr-favorites.c
index 59ca7d4..262d346 100644
--- a/examples/get-flickr-favorites.c
+++ b/examples/get-flickr-favorites.c
@@ -106,10 +106,6 @@ main (int argc, char **argv)
   char *frob, *url;
   const char *token;
 
-#if !GLIB_CHECK_VERSION (2, 36, 0)
-  g_type_init ();
-#endif
-
   proxy = flickr_proxy_new ("cf4e02fc57240a9b07346ad26e291080", "cdfa2329cb206e50");
 
   if (argc > 1) {
diff --git a/examples/lastfm-shout.c b/examples/lastfm-shout.c
index 5d82a9b..254ed63 100644
--- a/examples/lastfm-shout.c
+++ b/examples/lastfm-shout.c
@@ -86,10 +86,6 @@ main (int argc, char **argv)
     { NULL }
   };
 
-#if !GLIB_CHECK_VERSION (2, 36, 0)
-  g_type_init ();
-#endif
-
   context = g_option_context_new ("- send a shout to a Last.fm user");
   g_option_context_add_main_entries (context, entries, NULL);
   if (!g_option_context_parse (context, &argc, &argv, &error)) {
diff --git a/examples/post-twitter-media.c b/examples/post-twitter-media.c
index c4e2af3..ad3f4d5 100644
--- a/examples/post-twitter-media.c
+++ b/examples/post-twitter-media.c
@@ -4,7 +4,7 @@
  *
  * Authors: Rob Bradford <rob linux intel com>
  *          Ross Burton <ross linux intel com>
- * 
+ *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU Lesser General Public License,
  * version 2.1, as published by the Free Software Foundation.
@@ -33,10 +33,6 @@ main (int argc, char **argv)
   GError *error = NULL;
   char pin[256];
 
-#if !GLIB_CHECK_VERSION (2, 36 ,0)
-  g_type_init ();
-#endif
-
   if (argc != 2) {
     g_printerr ("$ post-twitter-media \"message\"\n");
     return -1;
diff --git a/examples/post-twitter.c b/examples/post-twitter.c
index 061221f..d87eb24 100644
--- a/examples/post-twitter.c
+++ b/examples/post-twitter.c
@@ -4,7 +4,7 @@
  *
  * Authors: Rob Bradford <rob linux intel com>
  *          Ross Burton <ross linux intel com>
- * 
+ *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU Lesser General Public License,
  * version 2.1, as published by the Free Software Foundation.
@@ -31,10 +31,6 @@ main (int argc, char **argv)
   GError *error = NULL;
   char pin[256];
 
-#if !GLIB_CHECK_VERSION (2, 36, 0)
-  g_type_init ();
-#endif
-
   if (argc != 2) {
     g_printerr ("$ post-twitter \"message\"\n");
     return 1;
diff --git a/examples/test-raw.c b/examples/test-raw.c
index d190366..3e6a437 100644
--- a/examples/test-raw.c
+++ b/examples/test-raw.c
@@ -47,10 +47,6 @@ main (gint argc, gchar **argv)
   const gchar *payload;
   gssize len;
 
-#if !GLIB_CHECK_VERSION (2, 36, 0)
-  g_type_init ();
-#endif
-
   loop = g_main_loop_new (NULL, FALSE);
 
   proxy = rest_proxy_new ("https://www.flickr.com/services/rest/";, FALSE);
diff --git a/examples/test-xml.c b/examples/test-xml.c
index 759e5a3..e3833de 100644
--- a/examples/test-xml.c
+++ b/examples/test-xml.c
@@ -113,10 +113,6 @@ main (gint argc, gchar **argv)
   RestProxyCall *call;
   GMainLoop *loop;
 
-#if !GLIB_CHECK_VERSION (2, 36 ,0)
-  g_type_init ();
-#endif
-
   loop = g_main_loop_new (NULL, FALSE);
 
   proxy = rest_proxy_new ("https://www.flickr.com/services/rest/";, FALSE);
diff --git a/rest-extras/test-runner.c b/rest-extras/test-runner.c
index 1702e2c..9f0c945 100644
--- a/rest-extras/test-runner.c
+++ b/rest-extras/test-runner.c
@@ -26,9 +26,6 @@
 int
 main (int argc, char *argv[])
 {
-#if !GLIB_CHECK_VERSION (2, 36, 0)
-  g_type_init ();
-#endif
   g_test_init (&argc, &argv, NULL);
 
   test_add ("/flickr/error", test_flickr_error);
diff --git a/rest/rest-private.h b/rest/rest-private.h
index 1a78f80..606f98e 100644
--- a/rest/rest-private.h
+++ b/rest/rest-private.h
@@ -4,7 +4,7 @@
  *
  * Authors: Rob Bradford <rob linux intel com>
  *          Ross Burton <ross linux intel com>
- * 
+ *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU Lesser General Public License,
  * version 2.1, as published by the Free Software Foundation.
diff --git a/rest/test-runner.c b/rest/test-runner.c
index 2f51043..990718e 100644
--- a/rest/test-runner.c
+++ b/rest/test-runner.c
@@ -26,9 +26,6 @@
 int
 main (int argc, char *argv[])
 {
-#if !GLIB_CHECK_VERSION (2, 36, 0)
-  g_type_init ();
-#endif
   g_test_init (&argc, &argv, NULL);
 
   test_add ("/oauth/param-encoding", test_param_encoding);
diff --git a/tests/custom-serialize.c b/tests/custom-serialize.c
index c4ca541..5cdf6d8 100644
--- a/tests/custom-serialize.c
+++ b/tests/custom-serialize.c
@@ -117,10 +117,6 @@ main (int argc, char **argv)
   char *url;
   GError *error = NULL;
 
-#if !GLIB_CHECK_VERSION (2, 36, 0)
-  g_type_init ();
-#endif
-
   server = soup_server_new (NULL);
   soup_server_add_handler (server, NULL, server_callback, NULL, NULL);
   url = g_strdup_printf ("http://127.0.0.1:%d/";, soup_server_get_port (server));
@@ -146,7 +142,7 @@ main (int argc, char **argv)
   }
 
   done:
-  
+
   g_object_unref (call);
   g_object_unref (proxy);
   soup_server_quit (server);
diff --git a/tests/flickr.c b/tests/flickr.c
index ab96008..4b2b8ac 100644
--- a/tests/flickr.c
+++ b/tests/flickr.c
@@ -36,10 +36,6 @@ main (int argc, char **argv)
   RestXmlParser *parser;
   RestXmlNode *root, *node;
 
-#if !GLIB_CHECK_VERSION (2, 36, 0)
-  g_type_init ();
-#endif
-
   /* Create the proxy */
   proxy = flickr_proxy_new (API_KEY, SHARED_SECRET);
 
diff --git a/tests/lastfm.c b/tests/lastfm.c
index b9c76bf..12e10d4 100644
--- a/tests/lastfm.c
+++ b/tests/lastfm.c
@@ -37,10 +37,6 @@ main (int argc, char **argv)
   RestXmlParser *parser;
   RestXmlNode *root, *u_node, *node;
 
-#if !GLIB_CHECK_VERSION (2, 36, 0)
-  g_type_init ();
-#endif
-
   /* Create the proxy */
   proxy = lastfm_proxy_new (API_KEY, SECRET);
 
diff --git a/tests/oauth-async.c b/tests/oauth-async.c
index 86f10c0..3151493 100644
--- a/tests/oauth-async.c
+++ b/tests/oauth-async.c
@@ -123,10 +123,6 @@ main (int argc, char **argv)
   RestProxy *proxy;
   OAuthProxy *oproxy;
 
-#if !GLIB_CHECK_VERSION (2, 36, 0)
-  g_type_init ();
-#endif
-
   /* Install a timeout so that we don't hang or infinite loop */
   g_timeout_add_seconds (10, on_timeout, NULL);
 
diff --git a/tests/oauth.c b/tests/oauth.c
index f8eca46..4d368ad 100644
--- a/tests/oauth.c
+++ b/tests/oauth.c
@@ -33,10 +33,6 @@ main (int argc, char **argv)
   RestProxyCall *call;
   GError *error = NULL;
 
-#if !GLIB_CHECK_VERSION (2, 36, 0)
-  g_type_init ();
-#endif
-
   /* Create the proxy */
   proxy = oauth_proxy_new ("key", "secret",
                            "http://oauthbin.com/v1/";,
diff --git a/tests/oauth2.c b/tests/oauth2.c
index 7bb1561..292ace3 100644
--- a/tests/oauth2.c
+++ b/tests/oauth2.c
@@ -47,10 +47,6 @@ test_extract_token ()
 int
 main (int argc, char **argv)
 {
-#if !GLIB_CHECK_VERSION (2, 36, 0)
-  g_type_init ();
-#endif
-
   test_extract_token ();
 
   return 0;
diff --git a/tests/proxy-continuous.c b/tests/proxy-continuous.c
index 8d4b6a3..6245181 100644
--- a/tests/proxy-continuous.c
+++ b/tests/proxy-continuous.c
@@ -160,9 +160,6 @@ main (int argc, char **argv)
   char *url;
   RestProxy *proxy;
 
-#if !GLIB_CHECK_VERSION (2, 36, 0)
-  g_type_init ();
-#endif
   loop = g_main_loop_new (NULL, FALSE);
 
   server = soup_server_new (NULL);
diff --git a/tests/proxy.c b/tests/proxy.c
index 031338c..89a9325 100644
--- a/tests/proxy.c
+++ b/tests/proxy.c
@@ -325,10 +325,6 @@ main (int argc, char **argv)
   char *url;
   RestProxy *proxy;
 
-#if !GLIB_CHECK_VERSION (2, 36, 0)
-  g_type_init ();
-#endif
-
   server = soup_server_new ("", NULL);
   g_thread_new ("Server Thread", server_thread_func, NULL);
 
diff --git a/tests/threaded.c b/tests/threaded.c
index d6cef87..e3fed70 100644
--- a/tests/threaded.c
+++ b/tests/threaded.c
@@ -84,10 +84,6 @@ main (int argc, char **argv)
   char *url;
   int i;
 
-#if !GLIB_CHECK_VERSION (2, 36, 0)
-  g_type_init ();
-#endif
-
   server = soup_server_new (NULL);
   soup_server_add_handler (server, NULL, server_callback, NULL, NULL);
   url = g_strdup_printf ("http://127.0.0.1:%d/";, soup_server_get_port (server));
diff --git a/tests/xml.c b/tests/xml.c
index 21e284b..1ee16e1 100644
--- a/tests/xml.c
+++ b/tests/xml.c
@@ -32,10 +32,6 @@ main (int argc, char **argv)
   RestXmlNode *root, *node;
   char *xml;
 
-#if !GLIB_CHECK_VERSION (2, 36, 0)
-  g_type_init ();
-#endif
-
   parser = rest_xml_parser_new ();
 
   root = rest_xml_parser_parse_from_data (parser, TEST_XML, strlen (TEST_XML));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]