mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-11 03:26:37 +03:00
Moved datatime compatibility macros with others
This commit is contained in:
parent
3fcb035126
commit
77c703395b
|
@ -93,12 +93,6 @@ error:
|
|||
return rv;
|
||||
}
|
||||
|
||||
#ifndef PyDateTime_DELTA_GET_DAYS
|
||||
#define PyDateTime_DELTA_GET_DAYS(o) (o->days)
|
||||
#define PyDateTime_DELTA_GET_SECONDS(o) (o->seconds)
|
||||
#define PyDateTime_DELTA_GET_MICROSECONDS(o) (o->microseconds)
|
||||
#endif
|
||||
|
||||
static PyObject *
|
||||
_pydatetime_string_delta(pydatetimeObject *self)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user