Re: info.plist with DYLD_LIBRARY_PATH = ~/test
Re: info.plist with DYLD_LIBRARY_PATH = ~/test
- Subject: Re: info.plist with DYLD_LIBRARY_PATH = ~/test
- From: Kyle Sluder <email@hidden>
- Date: Sat, 2 Oct 2010 18:54:27 -0700
On Oct 2, 2010, at 3:10 AM, Kurt Sutter <email@hidden> wrote:
> Sorry to be obtuse, but it may be that I am overlooking something. Presently, we have calls such as
>
> n = PyNumber_Float(obj)
> s = PyString_AsString(obj)
>
> I understand that I would need to generate #defines for all those names, such as PyNumber_Float to map them to some table. I would have to initialize that table in a big for loop that goes through another table containing the name of each function (e.g. "PyNumber_Float". The loop then looks each name up with dlsym and initializes the table.
>
> Or can this be done more elegantly?
Maybe weak linking can help here. If you weak link the Python library and call dlopen early on in your program's lifetime with the appropriate path, I think dyld will populate all the weak linked functions it finds.
--Kyle Sluder_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden