From: Konrad H. <hi...@cn...> - 2001-04-18 12:56:13
|
> All I did was insert a > > #define NO_IMPORT_ARRAY That works only if all symbols are globally visible, which is not true on most platforms. Does anyone know how shared libraries work in detail under MacOS X? Many systems allow the main executable (Python in our case) to choose what symbols are globally visible. Making changes at this level looks like the best solution to me, if possible. A simple solution would be to change line 262 in Numeric/arrayobject.h from void **PyArray_API; to static void **PyArray_API; This would break all client modules that consist of more than one source code file and make array-related calls in more than the main file. We have no such modules in the current NumPy, but there might of course be third-party modules out there that are affected. Another solution would be to add #define PyArray_API PyArray_API_umath in module umath just before including arrayobject.h, and add similar lines to other client modules. But this would require a modification to all client modules, including third-party modules, to make them work under MacOS. Konrad. -- ------------------------------------------------------------------------------- Konrad Hinsen | E-Mail: hi...@cn... Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24 Rue Charles Sadron | Fax: +33-2.38.63.15.17 45071 Orleans Cedex 2 | Deutsch/Esperanto/English/ France | Nederlands/Francais ------------------------------------------------------------------------------- |