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 fc8c2fe..fa894bf 100644
--- a/psycopg/python.h
+++ b/psycopg/python.h
@@ -87,6 +87,7 @@ typedef unsigned long Py_uhash_t;
#ifndef PyNumber_Int
#define PyNumber_Int PyNumber_Long
#endif
+
#endif /* PY_MAJOR_VERSION > 2 */
#if PY_MAJOR_VERSION < 3
@@ -104,6 +105,10 @@ typedef unsigned long Py_uhash_t;
#define Bytes_ConcatAndDel PyString_ConcatAndDel
#define _Bytes_Resize _PyString_Resize
+#define PyDateTime_DELTA_GET_DAYS(o) (((PyDateTime_Delta*)o)->days)
+#define PyDateTime_DELTA_GET_SECONDS(o) (((PyDateTime_Delta*)o)->seconds)
+#define PyDateTime_DELTA_GET_MICROSECONDS(o) (((PyDateTime_Delta*)o)->microseconds)
+
#else
#define Bytes_Type PyBytes_Type