Re: warning in g_value_register_transform_func
- From: Tim Janik <timj gtk org>
- To: Sven Neumann <sven gimp org>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: warning in g_value_register_transform_func
- Date: Tue, 11 Dec 2001 14:23:43 +0100 (CET)
On 8 Dec 2001, Sven Neumann wrote:
> 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 :-(
heh ;)
the code should indeed just catch reregistering a tfunc for
the same pair of types.
>
> Salut, Sven
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]