Re: Perl-Glib and libsoup issues



On Thursday, April 29, 2004, at 05:40 PM, Sameer VK wrote:

I'm trying to debug an issue with Perl-Glib and libsoup (HTTP library using Glib). I've set up a Perl interface to some C/C++ libraries that run on top of Glib and libsoup, using Perl-Glib and its mainloop.

did you use gperl.h or your own XS glue? if you don't use the functions and typemaps provided by the Glib module for wrapping objects and such, then it's quite tricky to get things to interoperate.


The interface works fine upto a point. Using gdb, I can trace all the way down to where a soup message function queues a message (event?) for execution - a call to a Web server. But Glib does not seem to be doing anything with the message or its related callback - no connect calls using strace, for instance.

is the main loop actually running?

i know nothing about libsoup; can you explain a bit how you're using it and what's happening?

a quick grep of the libsoup source shows only a few occurrences of g_main_* ... the only occurrence of g_main_loop_new(), in soup_server_run(), passes NULL to use the default context. from what i can tell, it uses the loop and destroys it before returning control to you.


Is there a way to check whether the context for the mainloop is different in Perl and C? I tried using the default context when creating a mainloop, but that didn't make a difference.

the bindings for this stuff are pretty thin, so i don't see why they shouldn't be the same. provided you can actually get the context pointer from libsoup, you can check them with a little black magick, but i'd rather not post the details where google will make it available for all to use as an example. ;-)

hint: look at the definitions for T_G_MAIN_CONTEXT in Glib/typemap.


--
"it's hard to be eventful when you have this much style."
   - me, rationalizing yet another night of sitting at home.




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