Hi, I think this discussion is actually better suited for the cython-devel mailing list. We should move it over there.
Zaur Shibzukhov, 21.02.2013 20:59: > четверг, 21 февраля 2013 г., 16:59:20 UTC+3 пользователь Stefan Behnel > написал: >> Zaur Shibzukhov, 21.02.2013 11:25: >>> Last time I actively used datetime module. Because I needed fast >>> creation >>> of date/time/datetime instances I wrote datetime.pxd. It contains much >>> of >>> datetime API from datetime.h + two extended version for time/datetime >>> creation. Does it make sense to include datetime.pxd in cython.cpython? >> >> Given that datetime.h is actually part of the header files that CPython >> installs, it makes total sense to me to include it. Please provide a pull >> request on github for it. > > OK. I will create pull request with datetime.pxd + tests Great. >> However, I don't know what you mean by "extended version for time/datetime >> creation". Could you show us the code for that first? >> > Datetime.h from cpython contains factory functions for creation > time/datetime without timezone info. > But actually datetime module contains public definition of factory > functions for creation time/date with timezone info, which are not in > cpython's datetime.h. > I could create datetime_ex.h for these functions in order to include them > in datetime.pxd. The problem: how to adopt datetime_ex.h to Cython... > > Current datetime.pxd looks like: > [...] I was more interested in the parts that are not in the public header file. Could you list those? Letting Cython generate those definitions isn't really all that much of a problem. We already do this for the stdlib array module, which doesn't have a public header file at all. Stefan _______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel