Re: A few comments on GVariant



On Mon, 30 Nov 2009 at 21:08:54 +0100, Christian Persch wrote:
> We do have that already with G_GINT*_FORMAT, G_GS[S]IZE_FORMAT,
> G_GOFFSET_FORMAT, and at least the G[S]SIZE one is useful.

I was under the impression that those were mainly to support the fact that the
right printf character varies by platform? For instance, gsize can either be
%u or %lu, and goffset could reasonably be anything from %i to %lli.

There's no G_GINT_FORMAT, because it would be %i everywhere by definition,
but because printf formats and default promotions (varargs) are defined in
terms of int/long/long long instead of 16/32/64 bit types, the fixed-length
types need these macros.

    S

Attachment: signature.asc
Description: Digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]