From 5e72b1f4f302e86a75399694d293e09a58d4bdbe Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sun, 21 Jun 2009 21:05:24 +0200 Subject: python/generic.h: Define a compat macro PyErr_WarnEx for Python 2.4 --- python/generic.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'python') diff --git a/python/generic.h b/python/generic.h index a9e6b8bf..4fe1f915 100644 --- a/python/generic.h +++ b/python/generic.h @@ -63,6 +63,11 @@ typedef int Py_ssize_t; #define PyBytes_AsStringAndSize PyString_AsStringAndSize #endif +// Hacks to make Python 2.4 build. +#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION <= 4 +#define PyErr_WarnEx(cat,msg,stacklevel) PyErr_Warn(cat,msg) +#endif + template struct CppPyObject : public PyObject { // We are only using CppPyObject and friends as dumb structs only, ie the -- cgit v1.2.3