From 63cc4251f90a0a49abec4470aa43df6f64761865 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Sat, 15 Apr 2006 16:47:06 +0000 Subject: ABI compatibility fixes --- ChangeLog | 6 ++++++ gobject/__init__.py | 1 + gobject/pygobject.h | 4 ++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3c0acd2..ca99507 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2006-04-15 Gustavo J. A. M. Carneiro + * gobject/__init__.py (_PyGObject_API): Copy _PyGObject_API from + gobject._gobject into gobject in order to preserve binary + compatibility with 3rd party modules. + + * gobject/pygobject.h (init_pygobject): Import gobject, gobject._gobject. + * gobject/Makefile.am: Fix pygobject installation dir: install both _gobject.la and __init__.py into $(pyexecdir)/gtk-2.0/gobject. diff --git a/gobject/__init__.py b/gobject/__init__.py index fed14fb..43a2cfd 100644 --- a/gobject/__init__.py +++ b/gobject/__init__.py @@ -28,6 +28,7 @@ except ImportError: pass from _gobject import * +_PyGObject_API = _gobject._PyGObject_API class GObjectMeta(type): "Metaclass for automatically registering GObject classes" diff --git a/gobject/pygobject.h b/gobject/pygobject.h index 7274bc5..55c72b1 100644 --- a/gobject/pygobject.h +++ b/gobject/pygobject.h @@ -263,7 +263,7 @@ struct _PyGObject_Functions *_PyGObject_API; } G_STMT_END #define init_pygobject() G_STMT_START { \ - PyObject *gobject = PyImport_ImportModule("gobject._gobject"); \ + PyObject *gobject = PyImport_ImportModule("gobject"); \ if (gobject != NULL) { \ PyObject *mdict = PyModule_GetDict(gobject); \ PyObject *cobject = PyDict_GetItemString(mdict, "_PyGObject_API"); \ @@ -276,7 +276,7 @@ struct _PyGObject_Functions *_PyGObject_API; } \ } else { \ PyErr_SetString(PyExc_ImportError, \ - "could not import gobject._gobject"); \ + "could not import gobject"); \ return; \ } \ } G_STMT_END -- cgit