[Pythonmac-SIG] making a C extension compatible across OS versions?

Nicholas Riley njriley at uiuc.edu
Thu May 26 15:39:00 CEST 2005


On Thu, May 26, 2005 at 02:28:59PM +0100, has wrote:
> Obviously the extension needs to be built on Tiger to provide sdef
> support, but what should I do to ensure that, say, applications
> containing that binary extension will still work OK when run on
> earlier OSes? For example, should I include both extension builds in
> the osaterminology package and have it import the appropriate one
> according to OS version, or is there a better/more elegant/official
> way of doing it?

You can use weak linking if you don't need to support 10.1.x or
earlier, otherwise you'll have to load individual bundles, or use
CFBundle or some lower-level mechanism to obtain and call through
function pointers.

<http://developer.apple.com/technotes/tn2002/tn2064.html>

-- 
Nicholas Riley <njriley at uiuc.edu> | <http://www.uiuc.edu/ph/www/njriley>


More information about the Pythonmac-SIG mailing list