Re: [gtk-list] Re: More about types...



Havoc Pennington wrote:
> 
> On Sat, 6 Mar 1999, Drazen Kacar wrote:
> > 
> > Neither of them helps a lot, but with printf it would be something
> > like this:
> 
> If you know the answer why did you ask? :-) g_print() would require the
> same conditional.

Because I know how to use printf, but I don't know how to use g_print.
Since there is no man page yet, I thought it would be best to ask.

> > Since GTK has all those gints, gpointers and such, it would be really
> > nice if there was gsize_t, goff_t & co. which would eliminate the
> > need for #ifdefs and different macros.
> 
> There's a gsize and gssize (signed and unsigned). I don't think there's an
> off_t.

I didn't know that. See? It's best to ask first. But, but, but...
gsize is typedefed to guint32. And that one is "unsigned int" vulgaris
domesticas. As far as I can tell, gsize is only used in declaration
of g_date_strftime() and it can definitely not be used as a replacement
for size_t.

> > So, is there something like that? If not, which gtype is guaranteed to
> > hold size_t and off_t without losing precision?

> Nothing special. There's gint/guint/glong/gulong but they don't offer
> additional guarantees over int/long.

Why do they exist then? To give me a false feeling of security? Or there
is a deeper meaning?

-- 
 .-.   .-.    Life is a sexually transmitted disease.
(_  \ /  _)
     |        dave@srce.hr
     |        dave@fly.cc.fer.hr



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