Revision 8076670c76ed171ce5bc373a596dfd98c5458d91

Mark Doliner mark at kingant.net
Mon Jun 11 13:49:25 EDT 2007


On Mon, 11 Jun 2007 12:34:26 -0500, Richard Laager wrote
> On Sun, 2007-06-10 at 13:12 -0400, markdoliner at pidgin.im wrote:
> > -----------------------------------------------------------------
> > Revision: 8076670c76ed171ce5bc373a596dfd98c5458d91
> > Ancestor: 05e0540c1a837fa061087b893a855d20e35011ef
> > Author: markdoliner at pidgin.im
> > Date: 2007-06-10T17:12:00
> > Branch: im.pidgin.pidgin
> > 
> > Modified files:
> >         pidgin/gtkft.c
> > 
> > ChangeLog: 
> > 
> > Use G_GSIZE_FORMAT when formatting strings containing size_t values in
> > the file transfer dialog.  Fixes #1312.
> 
> My first concern was that gsize was not size_t, but apparently it is,
>  in glib 2. That said, G_GSIZE_FORMAT is only in glib 2.6+. 
> Apparently we could use %zu, but that's non-standard? I think it 
> might be best to keep the old code for glib < 2.6 and say good 
> enough and then use the fixed code for new enough glib.
> 
> Also, wouldn't we want to remove the "(unsigned long)" cast on those 
> two function calls?
> 
> Richard

You're right on so many levels it isn't even funny.  Yes, G_GSIZE_FORMAT is
only in glib 2.6+.  Yes, %zu is apparently non-standard.  BUT,
libpurple/internal.h defines G_GSIZE_FORMAT if it isn't defined.  And we're
already using G_GSIZE_FORMAT in other places without problems, so it seems to
be working.

Yes, we want to remove the "(unsigned long)" casts.  Stu pointed that out to
me and I've already made the change and checked it in (Saturday I think?)

-Mark




More information about the Devel mailing list