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.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/glib/pyglib-python-compat.h b/glib/pyglib-python-compat.h
index 0fb4601..83357a8 100644
--- a/glib/pyglib-python-compat.h
+++ b/glib/pyglib-python-compat.h
@@ -45,7 +45,7 @@ typedef int Py_ssize_t;
#define _PyLongObject PyIntObject
#define _PyLong_Type PyInt_Type
#define _PyLong_AS_LONG PyInt_AS_LONG
-#define Py_TYPE(ob) (ob->ob_type)
+#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
#else
#undef PYGLIB_MODULE_START
#undef PYGLIB_MODULE_END