diff --git a/psycopg/python.h b/psycopg/python.h index 1358ef74..ce8516d8 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 */