Re: name -> widget func?
- From: Havoc Pennington <hp redhat com>
- To: Carlos Pereira <carlos pehoe civil ist utl pt>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: name -> widget func?
- Date: 01 Jan 2001 21:57:04 -0500
Carlos Pereira <carlos pehoe civil ist utl pt> writes:
This is from my own code (APP_LAYER is an integer in an enumeration):
gtk_object_set_data (GTK_OBJECT (menu), "select", (gpointer) APP_LAYER);
Should use the GINT_TO_POINTER() and GPOINTER_TO_INT() macros to do
this portably; apparently on some machines you need:
(gpointer) (glong) my_int - for conversion to pointer
(gint) (glong) my_int - for conversion from pointer
This comes up when sizeof(void*) is larger than sizeof(int) but equal
to sizeof(long). GINT_TO_POINTER and GPOINTER_TO_INT do the right
thing for the machine.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]