Re: [Fwd: glib integer formatting macros]



Hi, Tim 

> something like the below macros definitely belong into glib, though the
> actuall macros need to be somewhat more genric and comprehensive, i.e.
> we should provide G_GUINT_FORMAT and G_GULONG_FORMAT as well if we
> provide G_GUINT32_FORMAT (and probably for the rest of the g* types as
> well for consistency). also, these macros don't feature '%' flags, so
> they should probably be defined without the '%', with that you can do:
> 
> #define G_GUINT32_FORMAT "u"
>    guint32 n = 7;
>    g_print ("Hello agent %03" G_GUINT32_FORMAT "!\n", n);

I have committed a patch doing this. If its not ok, feel free to revert
it.

Bye,
Sebastian
-- 
Sebastian Wilhelmi                   |            här ovanför alla molnen
mailto:wilhelmi@ira.uka.de           |      är himmlen så förunerligt blå
http://goethe.ira.uka.de/~wilhelmi   |



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