summaryrefslogtreecommitdiff
path: root/psycopg/python.h
diff options
context:
space:
mode:
Diffstat (limited to 'psycopg/python.h')
-rw-r--r--psycopg/python.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/psycopg/python.h b/psycopg/python.h
index 95debf3..9567c96 100644
--- a/psycopg/python.h
+++ b/psycopg/python.h
@@ -53,6 +53,10 @@
#define CONV_CODE_PY_SSIZE_T "n"
#endif
+#ifndef Py_TYPE
+ #define Py_TYPE(o) ((o)->ob_type)
+#endif
+
/* FORMAT_CODE_PY_SSIZE_T is for Py_ssize_t: */
#define FORMAT_CODE_PY_SSIZE_T "%" PY_FORMAT_SIZE_T "d"