projects
/
platform
/
upstream
/
rpm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b8e0eb
)
PyVarObject_HEAD_INIT() compatibility macro for Python < 2.6
author
Panu Matilainen
<pmatilai@redhat.com>
Mon, 19 Oct 2009 08:06:07 +0000
(11:06 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Mon, 19 Oct 2009 08:06:07 +0000
(11:06 +0300)
python/rpmsystem-py.h
patch
|
blob
|
history
diff --git
a/python/rpmsystem-py.h
b/python/rpmsystem-py.h
index
afd88fb
..
35c0f4d
100644
(file)
--- a/
python/rpmsystem-py.h
+++ b/
python/rpmsystem-py.h
@@
-15,8
+15,15
@@
typedef ssize_t Py_ssize_t;
typedef Py_ssize_t (*lenfunc)(PyObject *);
#endif
+/* Compatibility macros for Python < 2.6 */
+#ifndef PyVarObject_HEAD_INIT
+#define PyVarObject_HEAD_INIT(type, size) \
+ PyObject_HEAD_INIT(type) size,
+#endif
+
#ifndef Py_TYPE
#define Py_TYPE(o) ((o)->ob_type)
#endif
+
#endif /* H_SYSTEM_PYTHON */