[pypy-dev] PyPy's PyDateTime_Delta definition

Skip Montanaro skip at pobox.com
Sat Sep 7 00:05:56 CEST 2013


> Sure. Use macros like PyDateTime_DELTA_GET_DAYS(). The structure is not part
> of the public API anyway.
> With CPython the macros don't make any difference, but PyPy implements them
> as actual function calls.

Ah, that makes sense.  The code in question was written when we were
still using Python 2.3 or 2.4, before there was any datetime C API. A
little tweak is in order I guess. Why are those PyDateTime*GET*
declarations in datetime.h? I might well have noticed them before
asking a basic question.

Skip


More information about the pypy-dev mailing list