summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Henstridge <james@daa.com.au>2003-07-31 13:05:50 +0000
committerJames Henstridge <jamesh@src.gnome.org>2003-07-31 13:05:50 +0000
commit77fb564f4dd90695f1188c156e0cb67658f13e0c (patch)
tree279fcf2871c05938f57e10aa106680cf87a76566
parentf12b1f2641b24969564a3d991c909cce96ddffd6 (diff)
downloadpygtk-77fb564f4dd90695f1188c156e0cb67658f13e0c.tar.gz
add a call to PyType_Ready() to make sure the type is initialised (bug
2003-07-31 James Henstridge <james@daa.com.au> * pygtype.c (pyg_object_descr_doc_get): add a call to PyType_Ready() to make sure the type is initialised (bug #118699).
-rw-r--r--ChangeLog5
-rw-r--r--gobject/pygtype.c4
-rw-r--r--pygtype.c4
3 files changed, 13 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index ae308535..83f9dcc9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-07-31 James Henstridge <james@daa.com.au>
+
+ * pygtype.c (pyg_object_descr_doc_get): add a call to
+ PyType_Ready() to make sure the type is initialised (bug #118699).
+
2003-07-26 James Henstridge <james@daa.com.au>
* gtk/gdk.override: apply Elliot Lee's threading patch. Still
diff --git a/gobject/pygtype.c b/gobject/pygtype.c
index 74b9fbc8..73ce4588 100644
--- a/gobject/pygtype.c
+++ b/gobject/pygtype.c
@@ -1126,6 +1126,10 @@ pyg_object_descr_doc_get(void)
static PyObject *doc_descr = NULL;
if (!doc_descr) {
+ PyGObjectDoc_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&PyGObjectDoc_Type))
+ return NULL;
+
doc_descr = PyObject_NEW(PyObject, &PyGObjectDoc_Type);
if (doc_descr == NULL)
return NULL;
diff --git a/pygtype.c b/pygtype.c
index 74b9fbc8..73ce4588 100644
--- a/pygtype.c
+++ b/pygtype.c
@@ -1126,6 +1126,10 @@ pyg_object_descr_doc_get(void)
static PyObject *doc_descr = NULL;
if (!doc_descr) {
+ PyGObjectDoc_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&PyGObjectDoc_Type))
+ return NULL;
+
doc_descr = PyObject_NEW(PyObject, &PyGObjectDoc_Type);
if (doc_descr == NULL)
return NULL;