warning in g_value_register_transform_func



Hi Tim,

I wonder if the g_warning in g_value_register_transform_func() makes
sense (gvalue.c:267):

  if (transform_func_lookup (src_type, dest_type))
    g_warning ("reregistering value transformation function (%p) for `%s' to `%s'",
	       transform_func,
	       g_type_name (src_type),
	       g_type_name (dest_type));


is there a reason why one shouldn't be able to change a transform_func?
If so, there still is a problem since transform_func_lookup() does not
check if there's a transform function registered for the two types.
Instead it walks up the type hierarchy and pulls in a transform function
from a parent class if one is available. This fact makes it impossible
to register different transform functions for deriveded value types.
Oh, well, it does not really make it impossible. In fact, it works
pretty well (check gimp CVS), but there's that warning being emitted :-(


Salut, Sven



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