[gtk-list] Re: gpointer values



It's actually a guint16 that I'm storing in a
gpointer for use as a hash key. E.g.,

guint16 port;
GHashTable services;
...

services=g_hash_table_new(g_direct_hash, g_direct_equal);

...

g_hash_table_insert(services, GUINT_TO_POINTER(port));


With that said, I've just realized that this is a moot point
and I'm going to have to use guint32 instead.

Mark


Tomi Ollila wrote:
> 
> Thursday Oct 7 13:58:26 +0000 1999 Mark Volpe <volpe.mark@epamail.epa.gov> wrote:
> > Yep, that's all I'm doing, just using a 16 bit value
> > ( a port number ) as a hash key.
> >
> > Mark
> 
> Hmm. I'm curious how the port number was originally a pointer value ?
> 
> Tomi



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