On Thu, 15 Jun 2000, David Benson wrote:
> > Hmm, I should have .c file with a call to g_atexit() that does nothing
> > or define a function called g_atexit() that does nothing?
> 
> ghack.c:
> 
>       void g_atexit()
>       {
>         /* do nothing */
>       }
> 
> Build the .so file:
> 
>       gcc -c -o ghack.o ghack.c
>       ld -shared -o ghack.so ghack.o
> 
> Test it:
> 
>       LD_PRELOAD=/home/username/ghack.so 
>       export LD_PRELOAD
>       apache                  # or however you start it.

Can I just include fake g_atexit() function in my bindings code instead
of compiling a separate file and setting LD_PRELOAD?

> Also:
>       most languages do not unload the gtk+ module
>       once it is loaded.  you can probably achieve this
>       effect by calling 
>               dlopen("/usr/lib/libgtk.so", RTLD_SHARED);
>       this might be more desirable for you, but once again,
>       may not work.

Yes, I just discovered Python does not call dlclose() on the imported
modules. The thing is, I don't call dlopen() on libgtk.so directly, my
bindings .so file is simply linked against it.

> ps.  why are you making gtk+ binding to php anyway?  how will you use them?

Well, PHP can be run from command line as well, so why not? :) It's just
another language.

-Andrei
* Use the source, Luke. *

_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to