Re: [RFC] automatic property getters and setters



On Sat, 2004-06-12 at 05:52, muppet wrote:

as discussed a while back[1], here's a way to remove the need for
Glib::Object::Subclass to provide GET_PROPERTY/SET_PROPERTY.  this is
step one, providing a fallback; step two is adding the per-property
setters and getters that would take precedence over [SG]ET_PROPERTY and
this fallback.

I like the idea, and the implementation also looks good to me.

While toying around with param_test.pl, I found a small glitch in
gperl_value_from_sv, though:  it never checks if the sv is NULL or undef
-- so returning undef from the custom GET_PROPERTY made it croak in
gperl_get_object_check.  The attached patch (hopefully) fixes that by
returning FALSE if the sv is not ok.

Bye,
-Torsten

Attachment: GValue.patch
Description: Text Data



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