diff options
| author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2018-05-20 23:56:29 +0100 |
|---|---|---|
| committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2018-05-20 23:56:29 +0100 |
| commit | e8a831dda2decd26f57bb227948da8af9237fb89 (patch) | |
| tree | 1395c3acd39c74989c0a891e57f01862e8cb698d /psycopg/python.h | |
| parent | be3b1ba1eb84244e97a9d85ba05ef2ca6b5a213b (diff) | |
| parent | a0f7027ad578c6c2707430e9a208cc3f7510cad4 (diff) | |
| download | psycopg2-e8a831dda2decd26f57bb227948da8af9237fb89.tar.gz | |
Merge branch 'master' into drop-2to3
Diffstat (limited to 'psycopg/python.h')
| -rw-r--r-- | psycopg/python.h | 5 |
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 |
