define a "polyfill" inline for python 2 compatibility

This commit is contained in:
Glyph 2017-12-12 03:12:54 -08:00
parent 852884e086
commit 3fcb035126

View File

@ -93,6 +93,12 @@ 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)
{