• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: info.plist with DYLD_LIBRARY_PATH = ~/test
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: info.plist with DYLD_LIBRARY_PATH = ~/test
      • From: Greg Parker <email@hidden>
    • Re: info.plist with DYLD_LIBRARY_PATH = ~/test
      • From: Kurt Sutter <email@hidden>
References: 
 >info.plist with DYLD_LIBRARY_PATH = ~/test (From: Kurt Sutter <email@hidden>)
 >Re: info.plist with DYLD_LIBRARY_PATH = ~/test (From: Ken Thomases <email@hidden>)
 >Re: info.plist with DYLD_LIBRARY_PATH = ~/test (From: Kurt Sutter <email@hidden>)
 >Re: info.plist with DYLD_LIBRARY_PATH = ~/test (From: Ken Thomases <email@hidden>)
 >Re: info.plist with DYLD_LIBRARY_PATH = ~/test (From: Kurt Sutter <email@hidden>)

  • Prev by Date: Re: info.plist with DYLD_LIBRARY_PATH = ~/test
  • Next by Date: Re: info.plist with DYLD_LIBRARY_PATH = ~/test
  • Previous by thread: Re: info.plist with DYLD_LIBRARY_PATH = ~/test
  • Next by thread: Re: info.plist with DYLD_LIBRARY_PATH = ~/test
  • Index(es):
    • Date
    • Thread