2013/9/7 Skip Montanaro <s...@pobox.com>

> > 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.
>

Not sure I understand. Or did you mean "why are those declarations not in
datetime.h"?
Then the answer is: because all these functions are generated during PyPy
translation.
The corresponding declarations are written in pypy_decl.h

-- 
Amaury Forgeot d'Arc
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
https://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to