Raphael Manfredi wrote: > Quoting Christian Biere <[EMAIL PROTECTED]> from ml.softs.gtk-gnutella.devel: > :This alone is sufficient to give GLib the kiss of death. If gsize is > :not the equivalent of size_t, the whole library is broken. This > :gint, glong, gsize non-sense is pissing me off to no extent anyway. > > I can understand the need for "gsize" or "gint32", when portability is > concerned.
I don't find gsize useful at all. Maybe if you use glib and nothing else it doesn't matter. But if I use libc or whatever library that uses size_t in the prototypes, gsize is better identical to size_t or otherwise you get strange issues with integer truncation and integer overflows. > Maybe gint and glong are here only to be in friendly company... Maybe but now we need to type an additional useless 'g' and the sources look always glib-tized instead of usual C code. Ok, if one doesn't care about consistency, one can freely mix gint and int. > It would be strange to use "int" at places and "gint32" at others? I'd > rather use "int32" then if we ditch "gint". I'd simply use the appropriate type: strlen() returns size_t, not gint, not glong, not gsize; rename() returns int, not gint32, not gsize or whatever etc. I believe the use of int as "int32" derives only from putting IP addresses into it, or not? If so that should be fixed anyway, so that we can support IPv6 somewhen in the future. -- Christian
pgpxbIR94Vw8D.pgp
Description: PGP signature
