Not a big deal. I did it this way:
// PyPy introduced the PyDateTime_DELTA_* API as functions even though
// they aren't available in CPython until v3.x. To make matters
// slightly worse, in CPython 3.x they are defined as macros.
#if !defined(PYPY_VERSION) && PY_MAJOR_VERSION < 3
#define PyDat
2013/9/7 Armin Rigo
> It seems that "struct PyDateTime_Delta" is supposed to be purely
> read-only. In case situation, wouldn't it make sense to expose a
> structure with a similar layout? I don't think we care about the
> overhead of copying three words; the only annoying case is about
> read-
2013/9/7 Skip Montanaro
> On Fri, Sep 6, 2013 at 6:13 PM, Skip Montanaro wrote:
> >> Not sure I understand. Or did you mean "why are those declarations not
> in
> >> datetime.h"?
> >
> > Yes, sorry about the typo.
>
> Alas, I am still confused. The PyDateTime_DELTA_GET_* macros aren't
> defined
Hi Skip, hi Amaury,
On Sat, Sep 7, 2013 at 3:16 AM, Skip Montanaro wrote:
> Alas, I am still confused. The PyDateTime_DELTA_GET_* macros aren't
> defined for CPython until the 3.x series. (There are macros in 2.7,
> but they are defined in datetimemodule.c, not in a public header file.
> PyPy dec