diff options
author | Timm Bäder <mail@baedert.org> | 2016-04-22 14:11:38 +0200 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2016-06-16 15:01:13 +0200 |
commit | 34a0bd8d768e154e74be5e8f495b3d23e7e656df (patch) | |
tree | e836bd0623ffa1d7327198e5b6ad51d5056d9b04 | |
parent | 291c4a80d4dceff67b39806827308b140dc45f20 (diff) | |
download | librest-34a0bd8d768e154e74be5e8f495b3d23e7e656df.tar.gz |
Remove all GLIB_CHECK_VERSION uses
Where the checked version is < 2.36, which we now require
-rw-r--r-- | examples/continuous-twitter.c | 6 | ||||
-rw-r--r-- | examples/dump-xml.c | 4 | ||||
-rw-r--r-- | examples/get-flickr-favorites.c | 4 | ||||
-rw-r--r-- | examples/lastfm-shout.c | 4 | ||||
-rw-r--r-- | examples/post-twitter-media.c | 6 | ||||
-rw-r--r-- | examples/post-twitter.c | 6 | ||||
-rw-r--r-- | examples/test-raw.c | 4 | ||||
-rw-r--r-- | examples/test-xml.c | 4 | ||||
-rw-r--r-- | rest-extras/test-runner.c | 3 | ||||
-rw-r--r-- | rest/rest-private.h | 2 | ||||
-rw-r--r-- | rest/test-runner.c | 3 | ||||
-rw-r--r-- | tests/custom-serialize.c | 6 | ||||
-rw-r--r-- | tests/flickr.c | 4 | ||||
-rw-r--r-- | tests/lastfm.c | 4 | ||||
-rw-r--r-- | tests/oauth-async.c | 4 | ||||
-rw-r--r-- | tests/oauth.c | 4 | ||||
-rw-r--r-- | tests/oauth2.c | 4 | ||||
-rw-r--r-- | tests/proxy-continuous.c | 3 | ||||
-rw-r--r-- | tests/proxy.c | 4 | ||||
-rw-r--r-- | tests/threaded.c | 4 | ||||
-rw-r--r-- | 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 6b50900..d8daa93 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 bffabe3..79f76aa 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 1befe72..08a55cb 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 b6af16e..4addb58 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 f23f985..69d8548 100644 --- a/tests/oauth-async.c +++ b/tests/oauth-async.c @@ -119,10 +119,6 @@ main (int argc, char **argv) OAuthProxy *oproxy; GError *error = NULL; -#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 01316dd..8ea54f0 100644 --- a/tests/proxy.c +++ b/tests/proxy.c @@ -307,10 +307,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); soup_server_add_handler (server, NULL, server_callback, NULL, NULL); soup_server_run_async (server); diff --git a/tests/threaded.c b/tests/threaded.c index abb11e7..b684896 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)); |