RE: [gtk-list] Casting gints to gpointers - Was: Re: Getting checkbutton's label
- From: "Damon Chaplin" <DAChaplin email msn com>
- To: <gtk-list redhat com>
- Subject: RE: [gtk-list] Casting gints to gpointers - Was: Re: Getting checkbutton's label
- Date: Thu, 9 Jul 1998 20:44:10 +0100
> I'd probably just cast the integer values to void pointers and then back
> in the callback...
I hope everyone is aware of the macros available to do this (in glib.h):
GPOINTER_TO_INT, GINT_TO_POINTER
GPOINTER_TO_UINT, GUINT_TO_POINTER
e.g. instead of:
index = (gint) selection->data;
use:
index = GPOINTER_TO_INT(selection->data);
These were sneaked into GTK 1.0.2, to avoid problems compiling code
on Alphas I believe. (Please correct me if I'm wrong.)
Damon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]