Re: param spec value type



James Henstridge <james daa com au> writes:
> On 14 Dec 2000, Havoc Pennington wrote:
> 
> > 
> > Hi,
> > 
> > gtk_object_add_arg_type() registers boxed args with
> > g_param_spec_boxed() which has value_type GBoxed - however GBoxed has
> > no value table so g_object_set() crashes when it calls g_value_init()
> > to set the boxed argument.
> 
> You mean for GTK_TYPE_BOXED?  Use of that typecode doesn't really make
> sense.  GTK_TYPE_BOXED is sort of an abstract type -- you should be using
> subtypes of GTK_TYPE_BOXED, rather than BOXED itself.
> 

No, if you register a subtype, the paramspec used by
gtk_object_add_arg_type() has G_TYPE_BOXED as its value_type, when
instead it should have the type passed in to g_param_spec_boxed() as
its value type. So all boxed args are segfaulting at the moment (try a
GdkColor arg for example).

Havoc





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