View Full Version : gboolean vs bool?
nickos
August 12th, 2011, 06:24 PM
alright so ive seen in many functions of type gbolean that return true or false.Is there any difference if its of type bool?
Bachstelze
August 12th, 2011, 07:05 PM
The difference is that gboolean is not standard, while bool is.
cgroza
August 12th, 2011, 07:23 PM
Wasn't gboolean introduced for having a bool equivalent in glibc since C does not have a bool type?
Bachstelze
August 12th, 2011, 07:33 PM
Wasn't gboolean introduced for having a bool equivalent in glibc since C does not have a bool type?
gboolean is a GLib type, not glibc. GLib is the core library used by GNOME, while glibc is the GNU C library. Totally different things.
Bachstelze
August 12th, 2011, 07:56 PM
Otherwise they are mostly the same, a gboolean is an int that should only hold two values, TRUE and FALSE (uppercase). FALSE is defined as 0 and TRUE is defined as !FALSE.
nickos
August 12th, 2011, 08:34 PM
right,thanks for that :)
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.