Re: New 'GObject' as base for GtkObject?



David Benson <daveb@idealab.com> writes:
> In the end, I think having the GTK_OBJECT()-style
> casts be equivalent to C-style casts but w/ additional
> checks is rather nice.
> 
> In a widget system, these costs might be bearable,
> but in a general purpose object system they are more
> questionable.
> 
> For example, in my server I have some places I've
> replaced the expensive casts to the native casts b/c
> they are called very frequently (e.g. in the GSourceFuncs functions).
> 

You just define GTK_NO_CHECK_CASTS and GTK_FOO(x) becomes equivalent
to ((GtkFoo*)x).

Havoc



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