Re: G_MODULE_BIND_LOCAL broke nautilus-python extension

On Wed, 08 Feb 2006 16:22:08 +0000, Gustavo J. A. M. Carneiro wrote:
>   So it seems that the desktop wide decision to load all modules with
> G_MODULE_BIND_LOCAL, for performance reasons, may break python
> extensions.  So far, nautilus-python was affected by this.  Do people
> have any suggestions?  Clearly Python has to be fixed, but that is a
> long term fix; how to fix things _now_?

Try calling dlopen("<whatever>", RTLD_GLOBAL) before calling
into the interpreter. If you're lucky that'll force the symbols into
global scope. If you're unlucky then you need to not link against
libpython yourself but instead dlopen and dlsym the APIs you need, and
hope that they actually exist (libpython does not have a stable ABI).

Relaytool can help with this if you're willing to trade off portability
for code simplicitly.

thanks -mike

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]