What is the reasoning behind types to be redefined in GLib? Why do they turn char into gchar, int into gint, etc.?
char
gchar
int
gint
Check out Basic Types in the GLib documentation. Essentially, it's to guarantee that certain types will exist with certain semantics, regardless of which C compiler or platform you're using. The types that C guarantees anyway are typedefed just to make all of the type names look uniform.
typedef
2.1m questions
2.1m answers
60 comments
57.0k users