Re: Problem with subclassing with Glib::Object::Subclass and Gtk3



10.04.2015, 11:01, "Torsten Schönfeld" <kaffeetisch gmx de>:
To avoid segfaults, Glib::Object::Introspection disallows undef for pointer arguments that are not marked 
as accepting NULL.  There is probably no "allow-none" annotation for the "previous_screen" argument of the 
"screen_changed" vfunc (check in <prefix>/share/gir-1.0/Gtk-3.0.gir).

Yes, there is no "allow-none" in "screen_changed" vfunc. BTW, it seems "allow-none" is depricated since GI 
1.42 (see https://wiki.gnome.org/Projects/GObjectIntrospection/Annotations) and should be replaced by 
(nullable) and (optional).

So, one option would be to add support to gobject-introspection for applying annotations to a vfunc from 
its associated signal.  Another would be to suppress the undef-checking when invoking fallback vfuncs in 
Glib::Object::Introspection.  Suggestions?

It seems the first one is the right way, and the second one is the fast way.


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