Re: more GDK->GTK mapping
- From: egger suse de
- To: hp redhat com
- Cc: osk hem passagen se, gtk-devel-list gnome org
- Subject: Re: more GDK->GTK mapping
- Date: Thu, 1 Mar 2001 20:48:15 +0100 (CET)
On 1 Mar, Havoc Pennington wrote:
> No. You don't want to use signed ints for bitfields, gboolean is a
> signed int.
Why the heck is gboolean signed? This is a design mistake IMHO
and should be rectified ASAP as a boolean is either TRUE or FALSE
also known as 1 and 0, thus no negative values can happen. It's
really a pity that boolean isn't an official type in C99 as it
allows some assumptions to be made which would speed up the executables
a bit since the compiler can optimize more.
Anyways, using unsigned types whereever possible makes the compiler
generate better code because it doesn't have to care about possible
signedness, however for boolean values the difference might be tiny,
yet the opportunity to use bitfields makes it interesting.
--
Servus,
Daniel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]