On 6-mrt-2006, at 3:24, Bob Ippolito wrote:

>
> 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.

What effect would this change have on the existing behaviour? Currently
modules cannot share symbols and IMO that is a good feature.

Zachary: how would you solve this on Windows? Are symbols shared between
modules there?

While we are on the subject of linking...  Bob: is '-undefined  
dynamic_lookup'
still necessary? I'd much rather link against the framework and  
without this
flag because this catches bugs earlier. IIRC we added this flag when  
Apple's
python and MacPython used the same directory for site-packages. Py2app
could (does?) rewrite all loader commands when building standalone  
applications.

Ronald

>
> -bob
>
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to