Re: storing integers in pointers
- From: Baurzhan Ismagulov <ibr ata cs hun edu tr>
- To: gtk-list gnome org
- Subject: Re: storing integers in pointers
- Date: Sat, 19 Mar 2005 13:16:33 +0100
On Sat, Mar 19, 2005 at 11:20:47AM +0000, Tim M?ller wrote:
> > I'm using GTree and GHashTable to store bytes as data (via provided type
> > conversion macros like GINT_TO_POINTER). Lookup functions return NULL if
> > the key was not found. Does this mean that one can't use the type
> > conversion trick to store data for which 0 is a valid value?
>
> You can if you use g_hashtable_lookup_extended() and g_tree_lookup_extended()
> for the lookup.
Oh, I've overseen that. Thanks much for the prompt answer, I was going
to rework my app!
With kind regards,
Baurzhan.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]