Richard Todd <[EMAIL PROTECTED]> writes:
>
> Here's a KDE project that tried to be cleaner by defining:
> #define environ (*_NSGetEnviron())
> http://cvs.sourceforge.net/viewcvs.py/kcvdphoto/kimg2mpg/aclocal.m4?rev=1.4
> (still have to #ifdef out the extern declaration, though...)

That sounds cleanest.

Does apple hide some advice on this somewhere in the man pages?  (To
put a reference to.)

> You may prefer the #define approach...I avoided it because I thought
> the init_xxx() stuff in guile was a clean enough place for it, and
> though I'm sure it's not an issue it would technically be more
> efficient not to do the function call on each access.

Yep.  But I'm guessing you need to hold the return from _NSGetEnviron,
ie. the address of the environ variable, not its contents a given
time.


_______________________________________________
Bug-guile mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-guile

Reply via email to