diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2018-01-10 23:12:01 +0000 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2018-01-10 23:12:01 +0000 |
commit | 1477482e5982ec52ccf6a5e8f1e1836aea062452 (patch) | |
tree | 6c70d95e1bab07bd3401bd2e3cd1a71eb6d4dcb7 | |
parent | 54cd0c66af99819f80da357976308c31453dc38f (diff) | |
download | psycopg2-1477482e5982ec52ccf6a5e8f1e1836aea062452.tar.gz |
Fixed pydatetime macros for Python 3.2
-rw-r--r-- | psycopg/python.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/psycopg/python.h b/psycopg/python.h index 1358ef7..ce8516d 100644 --- a/psycopg/python.h +++ b/psycopg/python.h @@ -111,10 +111,6 @@ 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 @@ -133,6 +129,12 @@ typedef unsigned long Py_uhash_t; #endif +#ifndef PyDateTime_DELTA_GET_DAYS +#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) +#endif + HIDDEN PyObject *Bytes_Format(PyObject *format, PyObject *args); /* Mangle the module name into the name of the module init function */ |