Re: Can't add new GTK 2.16 methods to GtkStyle



On Wed, Jan 21, 2009 at 7:47 AM, muppet <scott asofyet org> wrote:

On Jan 20, 2009, at 2:13 PM, Emmanuel Rodriguez wrote:

Here's a new version of the patch with the fixes requested.

<GtkStyle.patch>

Comment suffers cut and paste bug -- refers to g_object_get_property(), i
think you mean gtk_style_get_property().

Bad copy/paste that's now fixed.

Don't need braces around C if blocks with only one statement in them.

Removed.

Indentation on g_type_class_unref() is wonky.
s/\t/  /g;


If we actually hit the warn ("Invalid property ...") case, i think that the
return list will contain the property name instead of the value.  Should
that case include  ST (i - 2) = newSV (&PL_sv_undef) so that we give back
undef for bad property names?  Or should we croak on bad property names,
flagging that as programmer error?

I'm not setting undef and issuing a warning. Note that newSV ()
expects a length as argument, so I've changed the code to ST (i - 2) =
 newSVsv (&PL_sv_undef);.

Question do I actually need to wrap &PL_sv_undef with a SV? Can't I
just do  ST (i - 2) = &PL_sv_undef; ? I've tried both solutions and
the unit tests work. I've also tried fetching properties that don't
exist and I got no segmentation fault.

-- 
Emmanuel Rodriguez

Attachment: GtkStyle.patch
Description: Text Data



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