diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2009-10-19 11:06:07 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2009-10-19 11:06:07 +0300 |
commit | a2999caaf4fb6a1d121b71d009d15a7a651d2bf0 (patch) | |
tree | b4534e6f2d747450f9011e45a50c1a49ea7e428b /python/rpmsystem-py.h | |
parent | 4b8e0ebde64321a8dbcbdce9f44557185fde1719 (diff) | |
download | rpm-a2999caaf4fb6a1d121b71d009d15a7a651d2bf0.tar.gz |
PyVarObject_HEAD_INIT() compatibility macro for Python < 2.6
Diffstat (limited to 'python/rpmsystem-py.h')
-rw-r--r-- | python/rpmsystem-py.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/python/rpmsystem-py.h b/python/rpmsystem-py.h index afd88fb14..35c0f4d0e 100644 --- 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 */ |