Re: New 'GObject' as base for GtkObject?
- From: David Benson <daveb idealab com>
- To: gtk-devel-list redhat com
- cc: kenelson sequoia ece ucdavis edu
- Subject: Re: New 'GObject' as base for GtkObject?
- Date: Mon, 20 Dec 1999 14:50:54 -0800 (PST)
Yes, that was really my point: that the fast equivalent is
conceivable.
However I really like the safety the casts provide usually,
and usually the cost is bearable, it is only in these
*extremely* direct casts. In some situations prepare/check
may be called as many as 400 times per second for each
source that is going to be mixed together.
Only there does it add up to enough, whereas usually the cost of
the safe-casts is negligible. (And very helpful while
debugging... a sound library is very annoying to debug
if it can never keep up when any debugging info is present)
- Dave
On 20 Dec 1999, Havoc Pennington wrote:
> 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
>
>
> --
> To unsubscribe: mail gtk-devel-list-request@redhat.com with
> "unsubscribe" as the Subject.
>
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]