[Numpy-discussion] Exported symbols and code reorganization.

Charles R Harris charlesr.harris at gmail.com
Wed Jan 10 17:37:52 CST 2007


On 1/10/07, Robert Kern <robert.kern at gmail.com> wrote:
>
> Charles R Harris wrote:
>
> > Is there a reason that the pointer PyArray_API remains valid if the
> > imported numpy module is garbage collected? Or is the imported module
> > persistent even though the returned object goes away? I assume that
> > python did a dlopen somewhere.
>
> There is no provision in Python for safely unloading a C extension module,
> so we
> simply presume that sys.modules always holds a reference to the imported
> module
> and doesn't let it get garbage collected. People who futz with that get
> the
> segfaults they deserve.  ;-)


Ah, so that's why reload fails for C extension modules. Can't let the links
change either.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070110/abb3a57f/attachment.html 


More information about the Numpy-discussion mailing list