[pypy-dev] PyArray_Type cpyext bug
Antonio Cuni
anto.cuni at gmail.com
Mon Nov 25 14:09:18 CET 2013
Hi Matti,
On 23/11/13 20:55, Matti Picus wrote:
> Can we just say "don't do that?"
> I guess the answer is no...
> Going down the initialization route seems to be the way numpy does it, I see
> import_array();
> used extensively in numpy c code.
> Although making sure it is only called once seems to really complicate the
> header files, with API defines and strange macros.
I'm not sure about what you are saying. Of course we need to support
PyArray_Type because it's part (a very important part) of the numpy C API.
"import_array()" is unrelated because its role is to setup the functions to be
called from C code, while PyArray_Type is part of static data.
Anyway, I fixed it in 7f3a776cc72a, and I think it's the "correct" fix.
ciao,
Anto
More information about the pypy-dev
mailing list