Re: browsing a hash table



Emmanuel Saracco wrote:

hi,

is there another way that g_hash_table_foreach() to browse a hash table?
couldn't it be done with a for or a while loop instead?

There's no public way, because GHashTable structure is private.
You always may cut some lines of code from "glib/ghash.c" (LGPL)
and use for certain Glib version. But do you really want to save
some CPU cycles or some bytes of code ;) ? g_hash_table_foreach()
runs your function in *for* cycles so it wastes no more than ~10 CPU
commands.

Olexiy





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