[libsecret/wip/nielsdg/remove-useless-macros] Remove useless macro to check GLib version



commit cbea4ce7395935ecc1100ff1de23e500e92b2c46
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Sat Jan 19 12:12:32 2019 +0100

    Remove useless macro to check GLib version
    
    We already require GLib to have version 2.38 or higher in
    `configure.ac`, so no need to check in our code whether we have a
    version higher than 2.35

 libsecret/test-attributes.c | 3 ---
 libsecret/test-collection.c | 3 ---
 libsecret/test-item.c       | 3 ---
 libsecret/test-methods.c    | 3 ---
 libsecret/test-password.c   | 3 ---
 libsecret/test-paths.c      | 3 ---
 libsecret/test-prompt.c     | 3 ---
 libsecret/test-service.c    | 3 ---
 libsecret/test-session.c    | 3 ---
 libsecret/test-value.c      | 4 ----
 tool/secret-tool.c          | 4 ----
 11 files changed, 35 deletions(-)
---
diff --git a/libsecret/test-attributes.c b/libsecret/test-attributes.c
index e80d77c..192329d 100644
--- a/libsecret/test-attributes.c
+++ b/libsecret/test-attributes.c
@@ -193,9 +193,6 @@ main (int argc, char **argv)
 {
        g_test_init (&argc, &argv, NULL);
        g_set_prgname ("test-attributes");
-#if !GLIB_CHECK_VERSION(2,35,0)
-       g_type_init ();
-#endif
 
        g_test_add_func ("/attributes/build", test_build);
        g_test_add_func ("/attributes/build-unknown", test_build_unknown);
diff --git a/libsecret/test-collection.c b/libsecret/test-collection.c
index 349935b..662c41d 100644
--- a/libsecret/test-collection.c
+++ b/libsecret/test-collection.c
@@ -997,9 +997,6 @@ main (int argc, char **argv)
 {
        g_test_init (&argc, &argv, NULL);
        g_set_prgname ("test-collection");
-#if !GLIB_CHECK_VERSION(2,35,0)
-       g_type_init ();
-#endif
 
        g_test_add ("/collection/new-sync", Test, "mock-service-normal.py", setup, test_new_sync, teardown);
        g_test_add ("/collection/new-async", Test, "mock-service-normal.py", setup, test_new_async, teardown);
diff --git a/libsecret/test-item.c b/libsecret/test-item.c
index 52d86e6..ef156aa 100644
--- a/libsecret/test-item.c
+++ b/libsecret/test-item.c
@@ -859,9 +859,6 @@ main (int argc, char **argv)
 {
        g_test_init (&argc, &argv, NULL);
        g_set_prgname ("test-item");
-#if !GLIB_CHECK_VERSION(2,35,0)
-       g_type_init ();
-#endif
 
        g_test_add ("/item/new-sync", Test, "mock-service-normal.py", setup, test_new_sync, teardown);
        g_test_add ("/item/new-async", Test, "mock-service-normal.py", setup, test_new_async, teardown);
diff --git a/libsecret/test-methods.c b/libsecret/test-methods.c
index c0aecd4..e318cc8 100644
--- a/libsecret/test-methods.c
+++ b/libsecret/test-methods.c
@@ -949,9 +949,6 @@ main (int argc, char **argv)
 {
        g_test_init (&argc, &argv, NULL);
        g_set_prgname ("test-service");
-#if !GLIB_CHECK_VERSION(2,35,0)
-       g_type_init ();
-#endif
 
        g_test_add ("/service/search-sync", Test, "mock-service-normal.py", setup, test_search_sync, 
teardown);
        g_test_add ("/service/search-async", Test, "mock-service-normal.py", setup, test_search_async, 
teardown);
diff --git a/libsecret/test-password.c b/libsecret/test-password.c
index b745427..45d5a3c 100644
--- a/libsecret/test-password.c
+++ b/libsecret/test-password.c
@@ -365,9 +365,6 @@ main (int argc, char **argv)
 {
        g_test_init (&argc, &argv, NULL);
        g_set_prgname ("test-password");
-#if !GLIB_CHECK_VERSION(2,35,0)
-       g_type_init ();
-#endif
 
        g_test_add ("/password/lookup-sync", Test, "mock-service-normal.py", setup, test_lookup_sync, 
teardown);
        g_test_add ("/password/lookup-async", Test, "mock-service-normal.py", setup, test_lookup_async, 
teardown);
diff --git a/libsecret/test-paths.c b/libsecret/test-paths.c
index b703344..b437298 100644
--- a/libsecret/test-paths.c
+++ b/libsecret/test-paths.c
@@ -723,9 +723,6 @@ main (int argc, char **argv)
 {
        g_test_init (&argc, &argv, NULL);
        g_set_prgname ("test-service");
-#if !GLIB_CHECK_VERSION(2,35,0)
-       g_type_init ();
-#endif
 
        g_test_add ("/service/search-for-paths", Test, "mock-service-normal.py", setup, 
test_search_paths_sync, teardown);
        g_test_add ("/service/search-for-paths-async", Test, "mock-service-normal.py", setup, 
test_search_paths_async, teardown);
diff --git a/libsecret/test-prompt.c b/libsecret/test-prompt.c
index 30c3c14..a807531 100644
--- a/libsecret/test-prompt.c
+++ b/libsecret/test-prompt.c
@@ -404,9 +404,6 @@ main (int argc, char **argv)
 {
        g_test_init (&argc, &argv, NULL);
        g_set_prgname ("test-prompt");
-#if !GLIB_CHECK_VERSION(2,35,0)
-       g_type_init ();
-#endif
 
        /* Suppress these messages in tests */
        g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO | G_LOG_LEVEL_DEBUG,
diff --git a/libsecret/test-service.c b/libsecret/test-service.c
index c081275..96cfd2f 100644
--- a/libsecret/test-service.c
+++ b/libsecret/test-service.c
@@ -600,9 +600,6 @@ main (int argc, char **argv)
 {
        g_test_init (&argc, &argv, NULL);
        g_set_prgname ("test-service");
-#if !GLIB_CHECK_VERSION(2,35,0)
-       g_type_init ();
-#endif
 
        g_test_add ("/service/get-sync", Test, "mock-service-normal.py", setup_mock, test_get_sync, 
teardown_mock);
        g_test_add ("/service/get-async", Test, "mock-service-normal.py", setup_mock, test_get_async, 
teardown_mock);
diff --git a/libsecret/test-session.c b/libsecret/test-session.c
index b6fd447..3523f2a 100644
--- a/libsecret/test-session.c
+++ b/libsecret/test-session.c
@@ -219,9 +219,6 @@ main (int argc, char **argv)
 {
        g_test_init (&argc, &argv, NULL);
        g_set_prgname ("test-session");
-#if !GLIB_CHECK_VERSION(2,35,0)
-       g_type_init ();
-#endif
 
        g_test_add ("/session/ensure-aes", Test, "mock-service-normal.py", setup, test_ensure, teardown);
        g_test_add ("/session/ensure-twice", Test, "mock-service-normal.py", setup, test_ensure_twice, 
teardown);
diff --git a/libsecret/test-value.c b/libsecret/test-value.c
index 5578aef..9e1903b 100644
--- a/libsecret/test-value.c
+++ b/libsecret/test-value.c
@@ -216,10 +216,6 @@ main (int argc, char **argv)
        g_test_init (&argc, &argv, NULL);
        g_set_prgname ("test-value");
 
-#if !GLIB_CHECK_VERSION(2,35,0)
-       g_type_init ();
-#endif
-
        g_test_add_func ("/value/new", test_new);
        g_test_add_func ("/value/new-terminated", test_new_terminated);
        g_test_add_func ("/value/new-full", test_new_full);
diff --git a/tool/secret-tool.c b/tool/secret-tool.c
index c994bfb..524a364 100644
--- a/tool/secret-tool.c
+++ b/tool/secret-tool.c
@@ -491,10 +491,6 @@ main (int argc,
        textdomain (GETTEXT_PACKAGE);
 #endif
 
-#if !GLIB_CHECK_VERSION(2,35,0)
-       g_type_init ();
-#endif
-
        if (argc < 2)
                usage();
 


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