mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-07 12:50:32 +03:00
Moved datatime compatibility macros with others
This commit is contained in:
parent
3fcb035126
commit
77c703395b
|
@ -93,12 +93,6 @@ error:
|
||||||
return rv;
|
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 *
|
static PyObject *
|
||||||
_pydatetime_string_delta(pydatetimeObject *self)
|
_pydatetime_string_delta(pydatetimeObject *self)
|
||||||
{
|
{
|
||||||
|
|
|
@ -87,6 +87,7 @@ typedef unsigned long Py_uhash_t;
|
||||||
#ifndef PyNumber_Int
|
#ifndef PyNumber_Int
|
||||||
#define PyNumber_Int PyNumber_Long
|
#define PyNumber_Int PyNumber_Long
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* PY_MAJOR_VERSION > 2 */
|
#endif /* PY_MAJOR_VERSION > 2 */
|
||||||
|
|
||||||
#if PY_MAJOR_VERSION < 3
|
#if PY_MAJOR_VERSION < 3
|
||||||
|
@ -104,6 +105,10 @@ typedef unsigned long Py_uhash_t;
|
||||||
#define Bytes_ConcatAndDel PyString_ConcatAndDel
|
#define Bytes_ConcatAndDel PyString_ConcatAndDel
|
||||||
#define _Bytes_Resize _PyString_Resize
|
#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
|
#else
|
||||||
|
|
||||||
#define Bytes_Type PyBytes_Type
|
#define Bytes_Type PyBytes_Type
|
||||||
|
|
Loading…
Reference in New Issue
Block a user