From f6f2ed44c84aff3c38fc3eb5961b28621a14fc51 Mon Sep 17 00:00:00 2001 From: John Ehresman Date: Mon, 12 Apr 2010 23:21:24 -0400 Subject: 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) --- glib/pyglib-python-compat.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'glib/pyglib-python-compat.h') 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 -- cgit