summaryrefslogtreecommitdiff
path: root/psycopg/python.h
diff options
context:
space:
mode:
Diffstat (limited to 'psycopg/python.h')
-rw-r--r--psycopg/python.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/psycopg/python.h b/psycopg/python.h
index 9567c96..f4256d8 100644
--- a/psycopg/python.h
+++ b/psycopg/python.h
@@ -54,7 +54,7 @@
#endif
#ifndef Py_TYPE
- #define Py_TYPE(o) ((o)->ob_type)
+ #define Py_TYPE(o) (((PyObject*)(o))->ob_type)
#endif
/* FORMAT_CODE_PY_SSIZE_T is for Py_ssize_t: */