2013/9/7 Skip Montanaro <s...@pobox.com> > On Fri, Sep 6, 2013 at 6:13 PM, Skip Montanaro <s...@pobox.com> 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 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 declares them as functions. > > Is there some predefined "This is PyPy" macro I can check? >
Now I feel embarrassed. I was the one who added these macros to CPython 3.3, exactly for this reason. see the patch we propose for cx_Oracle: https://bitbucket.org/pypy/pypy/src/tip/pypy/module/cpyext/patches/cx_Oracle.patch "#ifdef PyDateTime_DELTA_GET_DAYS" should do the trick for any version. -- Amaury Forgeot d'Arc
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev