[libpeas] Remove obsolete PyGObject checks and comments



commit cdb32f7f27864f663d75f3aad8da6767273f9c84
Author: Garrett Regier <garrettregier gmail com>
Date:   Wed Sep 21 04:12:03 2011 -0700

    Remove obsolete PyGObject checks and comments

 configure.ac                               |    3 ---
 loaders/python/peas-plugin-loader-python.c |   20 +-------------------
 2 files changed, 1 insertions(+), 22 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 26df3a3..dee5fef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -339,9 +339,6 @@ else
 				 [found_python="no (pygobject >= $PYGOBJECT_REQUIRED not found)"])
 	fi
 	AC_MSG_RESULT([$found_python])
-
-	dnl FIXME: shall we check explicitely for PyGI here? Strictly speaking,
-	dnl it's not required for building libpeas, merely to use it properly.
 fi
 
 if test "$enable_python" = "yes" -a "$found_python" != "yes"; then
diff --git a/loaders/python/peas-plugin-loader-python.c b/loaders/python/peas-plugin-loader-python.c
index f29d83c..334f2d3 100644
--- a/loaders/python/peas-plugin-loader-python.c
+++ b/loaders/python/peas-plugin-loader-python.c
@@ -398,7 +398,7 @@ peas_plugin_loader_python_initialize (PeasPluginLoader *loader)
   /* Note that we don't call this with the GIL held, since we haven't initialised pygobject yet */
   peas_plugin_loader_python_add_module_path (pyloader, PEAS_PYEXECDIR);
 
-  /* import gobject */
+  /* Initialize PyGObject */
   pygobject_init (PYGOBJECT_MAJOR_VERSION, PYGOBJECT_MINOR_VERSION, PYGOBJECT_MICRO_VERSION);
   if (PyErr_Occurred ())
     {
@@ -413,24 +413,6 @@ peas_plugin_loader_python_initialize (PeasPluginLoader *loader)
 
   pyg_disable_warning_redirections ();
 
-  gi = PyImport_ImportModule ("gi");
-  if (gi == NULL)
-    {
-      g_warning ("Error initializing Python interpreter: could not "
-                 "import gi");
-
-      goto python_init_error;
-    }
-
-  gobject = PyImport_ImportModule ("gi.repository.GObject");
-  if (gobject == NULL)
-    {
-      g_warning ("Error initializing Python interpreter: could not "
-                 "import gobject");
-
-      goto python_init_error;
-    }
-
   /* i18n support */
   gettext = PyImport_ImportModule ("gettext");
   if (gettext == NULL)



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