[Python-Dev] next vs darwin

Martin v. Loewis martin@v.loewis.de
01 Feb 2002 20:19:46 +0100

Jack Jansen <jack@oratrix.com> writes:

> Hmm. I had a look at the setdlopenflags() and accompanying
> infrastructure, and it seems you can
> set many flags to dlopen() through this call, is that right?

Correct. It is admittedly very Unixish at the moment.

> If it is, is it a good idea to call the OSX-specific routine
> setdlopenflags() too, even though it will only support the "use
> global namespace" flag? Or is that the only flag you can reasonably
> pass to dlopen() anyway?

Effectively, yes. There is also a symbol RTLD_LOCAL, which is 0 on
most systems, and it may be reasonable to add RTLD_LAZY (defer
resolution of function symbols until they are called the first time).

Anyway, my main point is that this should be a run-time option. If the
APIs can merge, that might be a good thing (even if it means to
deprecate setdlopenflags); if that is not feasible, I'd atleast
recommend that you put the control over extension loading also into