param spec value type



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.

So value_type needs to be per-instance, the slow way is to add a
virtual function to GParamSpec which retrieves the value type, 
as an efficiency hack you could put a value_type field in the instance
which would be used instead of the one in the class, the one in the
class would just be a default initializer.

Havoc




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