~ubuntu-branches/ubuntu/quantal/libpeas/quantal

« back to all changes in this revision

Viewing changes to loaders/python/peas-plugin-loader-python.c

  • Committer: Package Import Robot
  • Author(s): Martin Pitt, Martin Pitt, Oliver Sauder
  • Date: 2011-09-05 08:41:48 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: package-import@ubuntu.com-20110905084148-u4qhltt1ipo2frj9
Tags: 1.1.3-0ubuntu1
[ Martin Pitt ]
* New upstream release:
  - Link against pygobject 3. (LP: #839712)
  - Do not cast pointers to unsigned integers.
* Drop debian/patches/gint_is_not_gtype, upstream now.
* debian/control.in: Bump python-gobject-dev build dependency to >= 2.90 as
  per upstream configure.ac.
* debian/control.in: Move valac-0.12 to valac to use 0.14.

[ Oliver Sauder ]
* Added peas-gtk vapi file libpeas-gtk-1.0.vapi (LP: #825834) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *
18
18
 *  You should have received a copy of the GNU Library General Public License
19
19
 *  along with this program; if not, write to the Free Software
20
 
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
20
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
21
 */
22
22
 
23
23
#ifdef HAVE_CONFIG_H
30
30
/* _POSIX_C_SOURCE is defined in Python.h and in limits.h included by
31
31
 * glib-object.h, so we unset it here to avoid a warning. Yep, that's bad. */
32
32
#undef _POSIX_C_SOURCE
 
33
#include <pygobject.h>
33
34
#include <Python.h>
34
 
#include <pygobject.h>
35
35
#include <signal.h>
36
36
 
37
37
#if PY_VERSION_HEX < 0x02050000
52
52
  PyObject *module;
53
53
} PythonInfo;
54
54
 
55
 
static PyObject *PyGObject_Type;
56
 
 
57
55
static gboolean   peas_plugin_loader_python_add_module_path (PeasPluginLoaderPython *pyloader,
58
56
                                                             const gchar            *module_path);
59
57
 
457
455
  /* Initialize support for threads */
458
456
  pyg_enable_threads ();
459
457
 
460
 
  gobject = PyImport_ImportModule ("gobject");
461
 
  if (gobject == NULL)
462
 
    {
463
 
      g_warning ("Error initializing Python interpreter: could not "
464
 
                 "import gobject");
465
 
 
466
 
      goto python_init_error;
467
 
    }
468
 
 
469
 
  mdict = PyModule_GetDict (gobject);
470
 
  PyGObject_Type = PyDict_GetItemString (mdict, "GObject");
471
 
  if (PyGObject_Type == NULL)
472
 
    {
473
 
      g_warning ("Error initializing Python interpreter: could not "
474
 
                 "get gobject.GObject");
475
 
 
476
 
      goto python_init_error;
477
 
    }
478
 
 
479
458
  gi = PyImport_ImportModule ("gi");
480
459
  if (gi == NULL)
481
460
    {
485
464
      goto python_init_error;
486
465
    }
487
466
 
 
467
  gobject = PyImport_ImportModule ("gi.repository.GObject");
 
468
  if (gobject == NULL)
 
469
    {
 
470
      g_warning ("Error initializing Python interpreter: could not "
 
471
                 "import gobject");
 
472
 
 
473
      goto python_init_error;
 
474
    }
 
475
 
488
476
  /* i18n support */
489
477
  gettext = PyImport_ImportModule ("gettext");
490
478
  if (gettext == NULL)