The program below gets some errors followed by a segv GLib-GObject-CRITICAL **: g_param_spec_ref: assertion `G_IS_PARAM_SPEC (pspec)' failed at /home/gg/bug/default-value/param-null.pl line 19. GLib-GObject-CRITICAL **: g_param_spec_sink: assertion `G_IS_PARAM_SPEC (pspec)' failed at /home/gg/bug/default-value/param-null.pl line 19. GLib-GObject-CRITICAL **: g_param_spec_get_name: assertion `G_IS_PARAM_SPEC (pspec)' failed at /home/gg/bug/default-value/param-null.pl line 19. I guess newSVGParamSpec() expect NULL. Is it meant to? Or is it up to _gperl_sv_from_value_internal(), per below? Maybe nobody ever used a paramspec property before. :-) I can't think what it'd be for. An object factory object thing maybe. -- "The only problem with Italian food is that 4 or 5 days later you start feeling a bit peckish again."
package MyThing; use strict; use warnings; use Glib; use Glib::Object::Subclass Glib::Object::, properties => [ Glib::ParamSpec->param_spec ('myprop', 'myprop', 'Blurb.', 'Glib::Param::Boolean', Glib::G_PARAM_READWRITE) ]; package main; use strict; use warnings; use Data::Dumper; my $obj = MyThing->new; my $x = $obj->get ('myprop'); print Dumper($x); exit 0;
Attachment:
GValue.xs.param-null.diff
Description: Text Data