Py_TYPE() compatibility macro for Python < 2.6
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 19 Oct 2009 07:57:13 +0000 (10:57 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 19 Oct 2009 07:57:13 +0000 (10:57 +0300)
python/rpmsystem-py.h

index 1544dd6..afd88fb 100644 (file)
@@ -15,4 +15,8 @@ typedef ssize_t Py_ssize_t;
 typedef Py_ssize_t (*lenfunc)(PyObject *);
 #endif  
 
+#ifndef Py_TYPE
+#define Py_TYPE(o) ((o)->ob_type)
+#endif
+
 #endif /* H_SYSTEM_PYTHON */