![](https://secure.gravatar.com/avatar/a53ea657e812241a1162060860f698c4.jpg?s=120&d=mm&r=g)
If I understand correctly, the addition of the static keyword means that the import_array() function can now only be used by extensions that are defined in a single C source file. I can easily work around this problem, by
True. That's exactly what I pointed out in a previous message in this list.
defining my own api pointer, and using a modified import_array() in my code,
That seems to me the preferred solution.
built ok, and we were formerly not following the instructions in the Python documentation and now we are. And, OS-X now worked. So far so good. If I
And those instructions mention the static keyword for a good reason: without it there are problems not only with portability, but also with static linking of extension modules.
Is there a way of institutionalizing your work-around so that others can use it?
I thought about providing a general solution right in the header files. The problem is the generation of a unique symbol by preprocessor tricks, perhaps somehow based on the module name. I don't see how this can be done. On the other hand, if we accept that the extension module programmer has to supply a unique symbol, then it is even easy. This would only be necessary for multi-file extension modules. Does that seem like a good solution?
Wait. I have an idea. Konrad was the one who put all this in. He should be punished for his good deed...(:->
I am even thinking of punishing myself by imposing extra work on me! ;-) Konrad. -- ------------------------------------------------------------------------------- Konrad Hinsen | E-Mail: hinsen@cnrs-orleans.fr 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 -------------------------------------------------------------------------------