Added compatibility PyErr_WarnEx macro for Python 2.4

This commit is contained in:
Daniele Varrazzo 2012-10-06 01:16:57 +01:00
parent fa032f09fb
commit 6b6aded90b

View File

@ -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