summaryrefslogtreecommitdiffstats
path: root/glib/pyglib-python-compat.h
diff options
context:
space:
mode:
authorJohn Ehresman <jpe@wingware.com>2010-04-12 23:21:24 -0400
committerJohn Ehresman <jpe@wingware.com>2010-04-15 12:13:34 -0400
commitf6f2ed44c84aff3c38fc3eb5961b28621a14fc51 (patch)
tree20d33d2b2dc36a454ba8ad9e59b823b50569e3a8 /glib/pyglib-python-compat.h
parentd8109d9de81a776794965d4cc1093ca03bebd6af (diff)
downloadpygobject-f6f2ed44c84aff3c38fc3eb5961b28621a14fc51.tar.gz
pygobject-f6f2ed44c84aff3c38fc3eb5961b28621a14fc51.tar.xz
pygobject-f6f2ed44c84aff3c38fc3eb5961b28621a14fc51.zip
Make pyglib-python-compat.h a public header and include in pygobject.h Also #define PyVarObject_HEAD_INIT if not defined (in < python 2.6)
Diffstat (limited to 'glib/pyglib-python-compat.h')
-rw-r--r--glib/pyglib-python-compat.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/glib/pyglib-python-compat.h b/glib/pyglib-python-compat.h
index 915a912..c2523ff 100644
--- a/glib/pyglib-python-compat.h
+++ b/glib/pyglib-python-compat.h
@@ -61,6 +61,13 @@ typedef inquiry lenfunc;
#define _PyLong_Type PyInt_Type
#define _PyLong_AS_LONG PyInt_AS_LONG
#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
+
+#ifndef PyVarObject_HEAD_INIT
+#define PyVarObject_HEAD_INIT(base, size) \
+ PyObject_HEAD_INIT(base) \
+ size,
+#endif
+
#else
#undef PYGLIB_MODULE_START
#undef PYGLIB_MODULE_END