[Pythonmac-SIG] dlopenflags and sharing symbols across python extension modules
Bob Ippolito
bob at redivi.com
Mon Mar 6 03:24:49 CET 2006
On Mar 5, 2006, at 5:56 PM, Zachary Pincus wrote:
> Otherwise, Mac Python's bundle loading code should have a way to
> expose the global symbol loading mechanism (necessary for C++ RTTI
> with templates) to user code. There are two ways that I imagine
> this could be added:
>
> (1) Provide run-time support for setting the NSLinkImage flags.
> This could be as simple as consulting the dlopenflags set in the
> sys module (and just noting in the documentation that on Macs, the
> 'dlopenflags' are really 'NSLinkImage flags'). Or there could be
> some mac-specific module where the NSLinkImage flags are defined,
> and where there is a SetNSLinkImageFlags command to call.
>
> (2) Move to using dlopen() to load the libraries instead of
> NSLinkImage. This might need some minor changes to dynload_shlib.c,
> and it would need the configure script to be smart enough to choose
> dynload_next.c on 10.2 and below.
>
> Neither of these seem too hard. I could try to work up a patch for
> one of these two fixes, if people agree that one or the other is a
> better approach. (I might need some guidance, but I would like to
> help get this issue resolved.)
If you come up with a patch for (2) against Python's svn trunk that
is tested and works on 10.2 then I'll commit it. It's not
appropriate to make this sort of change against Python 2.4, though.
*Maybe* for the universal branch that Ronald and I are doing, because
that's also unlikely to be merged with the 2.4 branch.
-bob
More information about the Pythonmac-SIG
mailing list