On Sat, 2010-05-01 at 17:17 +0530, Vikraman Choudhury wrote:
> Why and when should I use gint, gchar instead of int, char ?

mostly, 'because they look "integerated" with the rest of the types' and
'only when you want to'. that also holds true for gfloat and gdouble.

guint and guchar can save you from typing unsigned int and unsigned
char, so there's that. otherwise there's no actual reason, apart from
the "stylistic" one, for which you should be using gint, gchar, gfloat
and gdouble: they are always typedef'd to int, char, float and double
respectively.

other types, like gint8/16/32/64, goffset, gsize/gssize, etc. are useful
for portability purposes.

ciao,
 Emmanuele.

-- 
W: http://www.emmanuelebassi.name
B: http://blogs.gnome.org/ebassi

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to