From 6b6aded90b622a8119f3ad30aa164cd39f6e0a0f Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Sat, 6 Oct 2012 01:16:57 +0100 Subject: [PATCH] Added compatibility PyErr_WarnEx macro for Python 2.4 --- psycopg/python.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/psycopg/python.h b/psycopg/python.h index 6d87fa5b..f6d6be0a 100644 --- a/psycopg/python.h +++ b/psycopg/python.h @@ -35,6 +35,11 @@ # error "psycopg requires Python >= 2.4" #endif +#if PY_VERSION_HEX < 0x02050000 +/* Function missing in Py 2.4 */ +#define PyErr_WarnEx(cat,msg,lvl) PyErr_Warn(cat,msg) +#endif + #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) typedef int Py_ssize_t; #define PY_SSIZE_T_MIN INT_MIN