summaryrefslogtreecommitdiff
path: root/psycopg/python.h
diff options
context:
space:
mode:
Diffstat (limited to 'psycopg/python.h')
-rw-r--r--psycopg/python.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/psycopg/python.h b/psycopg/python.h
index 6d87fa5..f6d6be0 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