summaryrefslogtreecommitdiff
path: root/psycopg/python.h
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2018-05-20 23:56:29 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2018-05-20 23:56:29 +0100
commite8a831dda2decd26f57bb227948da8af9237fb89 (patch)
tree1395c3acd39c74989c0a891e57f01862e8cb698d /psycopg/python.h
parentbe3b1ba1eb84244e97a9d85ba05ef2ca6b5a213b (diff)
parenta0f7027ad578c6c2707430e9a208cc3f7510cad4 (diff)
downloadpsycopg2-e8a831dda2decd26f57bb227948da8af9237fb89.tar.gz
Merge branch 'master' into drop-2to3
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