Re: gboolean definition and size
- From: Dan Nicolaescu <dann godzilla ICS UCI EDU>
- To: Havoc Pennington <hp redhat com>
- Cc: gtk-devel-list gnome org
- Subject: Re: gboolean definition and size
- Date: Wed, 12 Sep 2001 17:36:40 -0700
Havoc Pennington <hp redhat com> writes:
> Dan Nicolaescu <dann godzilla ICS UCI EDU> writes:
> > Havoc Pennington <hp redhat com> writes:
> >
> > > Dan Nicolaescu <dann godzilla ICS UCI EDU> writes:
> > > > Is there any reason for gboolean to have a different size?
> > >
> > > IIRC it used to be a byte, but there were dozens of bugs introduced by
> > > that, so we just gave up and made it an int.
> >
> > So is it a good time now to revisit that decision?
> > Or you don't think it's appropriate?
> >
>
> I think we'll be to GTK 3 by the time C99 is widely deployed enough to
> be interesting, most likely.
OK.
> I almost always use "guint foo : 1" bitfields for booleans anyhow,
> when space is an issue...
Then please replace the following gboolean with a bitfield in:
struct _GtkCellRenderer
{
GtkObject parent;
gboolean can_activate;
gboolean visible;
[snip]
}
Maybe the GtkCellRenderer could use the same trick as GtkWidget for
storing these flags in "parent"... That would save 8 bytes. I could
send a patch for that if desired...
--dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]