summaryrefslogtreecommitdiffstats
path: root/glib/pyglib-python-compat.h
diff options
context:
space:
mode:
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