Re: [gtk-list] Re: How to use a gpointer?




On Fri, 5 Mar 1999, Drazen Kacar wrote:

> Ulric Eriksson wrote:
> 
> > It has been asserted that using Glib, a gint can be safely converted to
> > gpointer and back. For this to hold water, something needs to make it so.
> 
> >From Solaris 2.6 & 7 <sys/int_types.h>:
> 
> /*
>  * intptr_t and uintptr_t are signed and unsigned integer types large enough
>  * to hold any data pointer; that is, data pointers can be assigned into or
>  * from these integer types without losing precision.
> */

That's not what the draft said last time I looked at it. Rather, it said
that a pointer to void can be converted to this type and then back to a
pointer to void, which is the opposite of what I said above.

Even if the draft has changed, it doesn't help with the "typedef int gint"
problem. And of course, a draft is a draft and does not (yet) define what
C is.

Ulric



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