summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo J. A. M. Carneiro <gjc@src.gnome.org>2006-04-15 16:47:06 +0000
committerGustavo J. A. M. Carneiro <gjc@src.gnome.org>2006-04-15 16:47:06 +0000
commit63cc4251f90a0a49abec4470aa43df6f64761865 (patch)
treed557a113b52234b7f4de0a4ee2069547db91426b
parentf1ce8d89acfed9d30b0dee5a7c508a0bf966e5f1 (diff)
downloadpygobject-63cc4251f90a0a49abec4470aa43df6f64761865.tar.gz
pygobject-63cc4251f90a0a49abec4470aa43df6f64761865.tar.xz
pygobject-63cc4251f90a0a49abec4470aa43df6f64761865.zip
ABI compatibility fixes
-rw-r--r--ChangeLog6
-rw-r--r--gobject/__init__.py1
-rw-r--r--gobject/pygobject.h4
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 <gjc@gnome.org>
+ * 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