Re: Problems binding a struct that's not a GObject
- From: Emmanuel Rodriguez <emmanuel rodriguez gmail com>
- To: Torsten Schoenfeld <kaffeetisch gmx de>
- Cc: gtk-perl-list gnome org
- Subject: Re: Problems binding a struct that's not a GObject
- Date: Sun, 26 Apr 2009 15:01:26 +0200
On Thu, Apr 23, 2009 at 1:59 PM, Torsten Schoenfeld 
<kaffeetisch gmx de> wrote:
Emmanuel Rodriguez wrote:
I'm writing the bindings for libunique (http://live.gnome.org/LibUnique) so
far everything works fine except for the marshaling of the struct
"UniqueMessageData". This type is a normal struct and not a GObject
documented as follows:
 Âtypedef struct _UniqueMessageData UniqueMessageData;
I added to the maps file the conversion mapping for UniqueMessageData as a GBoxed and it works better, at least it doesn't crash. Now I have strange bug where the main window simply disapears (gets closed) when I receive a message, but this is another issue.
Â
I get in the first shell:
GType UniqueMessageData (138666312) is not registered with gperl at
examples/sample.pl line 40.
 
This happens because a signal apparently uses UniqueMessageData in its signature, so the generic signal marshaller in Glib complains that this type hasn't been registered with the bindings. ÂIf you put UniqueMessageData in your 'maps' file, this should just work.
Yes the signal that I bind receives an UniqueMessageData in the arguments. This is why I was suspecting that Glib was able to convert the UniqueMessageData struct into a valid perl object.
-- 
Emmanuel Rodriguez
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]