[SciPy-dev] newscipy segfaults fixed!

Pearu Peterson pearu at scipy.org
Wed Oct 19 00:00:27 CDT 2005



On Tue, 18 Oct 2005, Travis Oliphant wrote:

>> Hmm, may be PyArray_API should not be defined as static. Is there a reason
>> that PyArray_API must be defined static?
>
> Wait a minute.... PyArray_API is defined exactly the same way the
> Numeric defined it.  It's static (and filled by import_array) unless
> PY_ARRAY_UNIQUE_SYMBOL is defined or NO_IMPORT or NO_IMPORT_ARRAY is
> defined.
>
> So, the thing to do is compile fortranobject.c with NO_IMPORT_ARRAY
> defined (that way PyArray_API is declared extern), and define
> PY_ARRAY_UNIQUE_SYMBOL to be <whatever>, and then compile the extension
> modules that want to use fortranobject.c code by defining
> PY_ARRAY_UNIQUE_SYMBOL to be <whatever>.
>
> This was the same way you had to do it in Numeric.  So, I don't see
> what's changed.

Yes, I noticed that too and yesterday I copied Numeric PyArray_API 
handling also to newcore. So, now everything is fine.

Pearu




More information about the Scipy-dev mailing list