summaryrefslogtreecommitdiffstats
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
commit5dde78e335bb41025520841809729401cf68ff14 (patch)
tree32372ad7806a1207caadb67c8db20ac083a18c1d
parent86ed4b32851b5fde01af74846f691f2cb07c6048 (diff)
downloadpygobject-5dde78e335bb41025520841809729401cf68ff14.tar.gz
pygobject-5dde78e335bb41025520841809729401cf68ff14.tar.xz
pygobject-5dde78e335bb41025520841809729401cf68ff14.zip
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--gobject/pygtype.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gobject/pygtype.c b/gobject/pygtype.c
index 74b9fbc..73ce458 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;