Hi,
On Tue, Nov 19, 2002 at 01:48:21PM -0600, Steve Greenland wrote:
> If, for some weird reason, you absolutely must have a signed 8-bit
> arithmetic type, the proper type is 'int8_t' (found in 'stdint.h'[1]).
> Not char. Not signed char[2].
I agree, but I'm willing to bet that assuming sizeof(char) is 1 is more
portable today than assuming stdint.h is available.
But the point is: if a particular size or signedness is required for a
variable, then its type name should make that clear.
A gchar is about as undescriptive as you can get; uint8 would have been
so much better. Glib could perfectly have used autoconf to sort out how
to define or typedef a [u]int{8,16,32,ptr,64} using the standard C types
on a certain platform if it really needed them.
Cheers,
Emile.
--
E-Advies / Emile van Bergen | emile@e-advies.info
tel. +31 (0)70 3906153 | http://www.e-advies.info
Attachment:
pgpFK5aLsF_cF.pgp
Description: PGP signature