I've been reading some code which uses gtk+
and I've encountered types like gboolean
and gunichar
.
As long as I can understand the point of using gunichar
instead of wchar_t
(glib gunichar and wchar_t), I can't really understand the point of using gboolean
instead of bool
.
Question: What's the point of using gboolean
instead of bool
? Is there something more than just being careful about the code style consistency?
It wouldn't be so weird to me if it were used for a general consistency (if one decides to use GLib
, one'll prefer to use types defined there). However the author of that code uses int
instead of gint
. Is the author just being careless?
Just to add more details (official GLib as a reference):
gunichar
is defined astypedef guint32 gunichar
guint32
is defined astypedef unsigned int guint32
gboolean
is defined astypedef gint gboolean
gint
is defined astypedef int gint