[libpeas] Remove g_type_init() calls
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Remove g_type_init() calls
- Date: Thu, 14 Feb 2013 12:02:41 +0000 (UTC)
commit 9539be96f9b0df1e0afe8191945585334dc53631
Author: Garrett Regier <garrettregier gmail com>
Date: Sun Nov 4 07:38:46 2012 -0800
Remove g_type_init() calls
But call it in testing_util_init() if GLib < 2.35.0.
tests/libpeas-gtk/plugin-manager-store.c | 2 --
tests/libpeas-gtk/plugin-manager-view.c | 2 --
tests/libpeas-gtk/plugin-manager.c | 2 --
tests/libpeas/engine.c | 2 --
tests/libpeas/extension-c.c | 1 -
tests/libpeas/extension-gjs.c | 2 --
tests/libpeas/extension-python.c | 1 -
tests/libpeas/extension-python3.c | 1 -
tests/libpeas/extension-seed.c | 2 --
tests/libpeas/extension-set.c | 2 --
tests/libpeas/plugin-info.c | 2 --
tests/testing-util/testing-util.c | 4 ++++
12 files changed, 4 insertions(+), 19 deletions(-)
---
diff --git a/tests/libpeas-gtk/plugin-manager-store.c b/tests/libpeas-gtk/plugin-manager-store.c
index bd7d656..83aa47e 100644
--- a/tests/libpeas-gtk/plugin-manager-store.c
+++ b/tests/libpeas-gtk/plugin-manager-store.c
@@ -299,8 +299,6 @@ main (int argc,
{
gtk_test_init (&argc, &argv, NULL);
- g_type_init ();
-
#define TEST(path, ftest) \
g_test_add ("/gtk/plugin-manager-store/" path, TestFixture, \
(gpointer) test_gtk_plugin_manager_store_##ftest, \
diff --git a/tests/libpeas-gtk/plugin-manager-view.c b/tests/libpeas-gtk/plugin-manager-view.c
index f58779f..00dbacb 100644
--- a/tests/libpeas-gtk/plugin-manager-view.c
+++ b/tests/libpeas-gtk/plugin-manager-view.c
@@ -244,8 +244,6 @@ main (int argc,
{
gtk_test_init (&argc, &argv, NULL);
- g_type_init ();
-
#define TEST(path, ftest) \
g_test_add ("/gtk/plugin-manager-view/" path, TestFixture, \
(gpointer) test_gtk_plugin_manager_view_##ftest, \
diff --git a/tests/libpeas-gtk/plugin-manager.c b/tests/libpeas-gtk/plugin-manager.c
index 603fe50..bba1734 100644
--- a/tests/libpeas-gtk/plugin-manager.c
+++ b/tests/libpeas-gtk/plugin-manager.c
@@ -465,8 +465,6 @@ main (int argc,
{
gtk_test_init (&argc, &argv, NULL);
- g_type_init ();
-
#define TEST(path, ftest) \
g_test_add ("/gtk/plugin-manager/" path, TestFixture, \
(gpointer) test_gtk_plugin_manager_##ftest, \
diff --git a/tests/libpeas/engine.c b/tests/libpeas/engine.c
index 7c58d5b..42f97ff 100644
--- a/tests/libpeas/engine.c
+++ b/tests/libpeas/engine.c
@@ -452,8 +452,6 @@ main (int argc,
{
g_test_init (&argc, &argv, NULL);
- g_type_init ();
-
#define TEST(path, ftest) \
g_test_add ("/engine/" path, TestFixture, \
(gpointer) test_engine_##ftest, \
diff --git a/tests/libpeas/extension-c.c b/tests/libpeas/extension-c.c
index 04af781..b55559f 100644
--- a/tests/libpeas/extension-c.c
+++ b/tests/libpeas/extension-c.c
@@ -66,7 +66,6 @@ main (int argc,
char *argv[])
{
g_test_init (&argc, &argv, NULL);
- g_type_init ();
/* Only test the basics */
testing_extension_basic ("c");
diff --git a/tests/libpeas/extension-gjs.c b/tests/libpeas/extension-gjs.c
index 327a9c4..3db6776 100644
--- a/tests/libpeas/extension-gjs.c
+++ b/tests/libpeas/extension-gjs.c
@@ -49,8 +49,6 @@ main (int argc,
{
g_test_init (&argc, &argv, NULL);
- g_type_init ();
-
testing_extension_all ("gjs");
EXTENSION_TEST (gjs, "nonexistent", nonexistent);
diff --git a/tests/libpeas/extension-python.c b/tests/libpeas/extension-python.c
index 7f10436..f000371 100644
--- a/tests/libpeas/extension-python.c
+++ b/tests/libpeas/extension-python.c
@@ -112,7 +112,6 @@ main (int argc,
char *argv[])
{
g_test_init (&argc, &argv, NULL);
- g_type_init ();
testing_extension_all ("python");
diff --git a/tests/libpeas/extension-python3.c b/tests/libpeas/extension-python3.c
index dee8876..dbd0d44 100644
--- a/tests/libpeas/extension-python3.c
+++ b/tests/libpeas/extension-python3.c
@@ -112,7 +112,6 @@ main (int argc,
char *argv[])
{
g_test_init (&argc, &argv, NULL);
- g_type_init ();
testing_extension_all ("python3");
diff --git a/tests/libpeas/extension-seed.c b/tests/libpeas/extension-seed.c
index cd31750..c5fe117 100644
--- a/tests/libpeas/extension-seed.c
+++ b/tests/libpeas/extension-seed.c
@@ -48,8 +48,6 @@ main (int argc,
{
g_test_init (&argc, &argv, NULL);
- g_type_init ();
-
testing_extension_all ("seed");
EXTENSION_TEST (seed, "nonexistent", nonexistent);
diff --git a/tests/libpeas/extension-set.c b/tests/libpeas/extension-set.c
index 073e04a..5d7d2ed 100644
--- a/tests/libpeas/extension-set.c
+++ b/tests/libpeas/extension-set.c
@@ -292,8 +292,6 @@ main (int argc,
{
g_test_init (&argc, &argv, NULL);
- g_type_init ();
-
#define TEST(path, ftest) \
g_test_add ("/extension-set/" path, TestFixture, \
(gpointer) test_extension_set_##ftest, \
diff --git a/tests/libpeas/plugin-info.c b/tests/libpeas/plugin-info.c
index 227a72a..bf0e3df 100644
--- a/tests/libpeas/plugin-info.c
+++ b/tests/libpeas/plugin-info.c
@@ -182,8 +182,6 @@ main (int argc,
{
g_test_init (&argc, &argv, NULL);
- g_type_init ();
-
#define TEST(path, ftest) \
g_test_add ("/plugin-info/" path, TestFixture, \
(gpointer) test_plugin_info_##ftest, \
diff --git a/tests/testing-util/testing-util.c b/tests/testing-util/testing-util.c
index 8813dff..a97bcbd 100644
--- a/tests/testing-util/testing-util.c
+++ b/tests/testing-util/testing-util.c
@@ -124,6 +124,10 @@ testing_util_init (void)
if (initialized)
return;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
+ g_type_init ();
+#endif
+
/* Don't abort on warnings or criticals */
g_log_set_always_fatal (G_LOG_LEVEL_ERROR);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]