From a2999caaf4fb6a1d121b71d009d15a7a651d2bf0 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 19 Oct 2009 11:06:07 +0300 Subject: [PATCH] PyVarObject_HEAD_INIT() compatibility macro for Python < 2.6 --- python/rpmsystem-py.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/rpmsystem-py.h b/python/rpmsystem-py.h index afd88fb..35c0f4d 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 */ -- 2.7.4