Re: [gtk-list] Re: gtk_object_set_data() and integers

On Fri, 30 Jul 1999, Havoc Pennington wrote:

> There are GINT_TO_POINTER() and GPOINTER_TO_INT() macros in glib. In
> practice putting an int in a pointer is pretty safe; but the reverse is
> not. The glib macros are intended only to store ints in pointers, not

This is exactly what I'm doing. I'll consider the matter closed until something
breaks horribly ;).

> a 32-bit int is big enough you have no problem. If you need 64 bits, you
> need to be using gint64 anyway and checking the HAVE_GINT64 macro.)

I may port to Alpha and UltraSparc very soon--we'll see. Right now
we're only releasing x86 and PPC binaries, so it's effectively a non-issue.



"How wonderful! How mysterious                                   Programmer
 I carry wood! I draw water!"                   Loki Entertainment Software
 - Anonymous Tao poet

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