[Pythonmac-SIG] ext build problem
Jack Jansen
Jack.Jansen at cwi.nl
Wed Oct 29 07:23:46 EST 2003
On 29 Oct 2003, at 0:35, Keith Jackson wrote:
> All,
> Once again I've run into the "_environ" problem while trying to build
> 4Suite. I'm using python2.3.2 built as a framework build. As part of
> trying to debug this, I've written a very simple test that shows the
> same behavior for me. I'd appreciate it if someone else could try this
> and see if they see the same behavior. Also, if I'm doing something
> dumb please let me know. ;)
It's not you who's doing something dumb, it's Apple:-)
_environ is defined in crt0, which means you don't have access to it in
shared libraries or bundles. The workaround is to call _NSGetEnviron()
to get at the environment pointer, see Modules/posixmodule.c for a way
to do this in one place in your code that will make _environ available
to all the rest of your shared library (or bundle).
--
Jack Jansen <Jack.Jansen at cwi.nl> http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma
Goldman
More information about the Pythonmac-SIG
mailing list