Hi, The latest CVS version of Ruby-GNOME2 is throwing exceptions when registering new signals. e.g. ---8<--- require 'glib2' class Foo < GLib::Object type_register signal_new("bar", GLib::Signal::RUN_FIRST, nil, GLib::Type["void"]) def do_bar end end ---8<--- I think the problem is the in revision 1.52 of ruby-gnome2/ruby-gnome2/glib/src/rbgobj_signal.c and revision 1.26 of ruby-gnome2/ruby-gnome2/glib/src/rbgobj_closure.c New function 'g_rclosure_attach' expects to be given a instance of a GObject (ie. T_DATA) but for a new signal the class, rather than an instance, is passed instead (ie. T_CLASS). AFAICS, the purpose of the changes is to make it possible to do garbage collection of proc objects. As classes never die (and so the closure won't be ), what I've tried to do is disable the code which reduces the reference count on a GRClosure unless the object is of type T_DATA: it would never be called, because the class will never be GC'd. If someone who understands the internals of the glib bindings better than I do could review the attached patch, that would be great. Thanks, Geoff.
on 2006-04-20 16:55
on 2006-04-20 16:59
Hi, In <email@example.com> "[ruby-gnome2-devel-en] Adding new signals with latest CVS" on Thu, 20 Apr 2006 13:47:47 +0100, Geoff Y. <firstname.lastname@example.org> wrote: > The latest CVS version of Ruby-GNOME2 is throwing exceptions when > registering new signals. Oh... I have fixed the problem today in CVS. Thanks, -- kou ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709...