[Cython] To Add datetime.pxd to cython.cpython

Zaur Shibzukhov szport at gmail.com
Sun Mar 3 15:52:10 CET 2013


2013/3/2 Stefan Behnel <stefan_ml at behnel.de>:
> Hi,
>
> the last pull request looks good to me now.
>
> https://github.com/cython/cython/pull/189
>
> Any more comments on it?
>
> Stefan
>

As was suggested earlier, I added `import_datetime` inline function to
initialize PyDateTime C API instead of direct usage of "non-native" C
macros from datetime.h.
Now you call `import_array ()` first in the same way as is done with `numpy`.
 This approach looks natural in the light of experience with numpy.


Zaur Shibzukhov


More information about the cython-devel mailing list