Hi,
Is there any API for iterating GHashTable?
I only see the the g_hash_table_foreach() here. But sometimes people may
like to iterate through a hash table and stop the iteration when certain
conditions are met.
Currently, there is g_hash_table_size(), we could easily add iteration
by provid
Hi,
Is there any API for iterating GHashTable?
I only see the the g_hash_table_foreach() here. But sometimes people may
like to iterate through a hash table and stop the iteration when certain
conditions are met.
Currently, there is g_hash_table_size(), we could easily add iteration
by providing
Hi,
Tony Yat-Tung Cheung <[EMAIL PROTECTED]> writes:
> Currently, there is g_hash_table_size(), we could easily add iteration
> by providing the following two new APIs,
>
> gconstpointer g_hash_table_get_key(GHashTable *hash_table, int pos);
> gconspointer g_hash_table_get_value(GHashTable *hash
> I only see the the g_hash_table_foreach() here. But sometimes people may
> like to iterate through a hash table and stop the iteration when certain
> conditions are met.
It is rather trivial to construct a GList of hash table keys (or
values) using g_hash_table_foreach. Of course it's only use
Hi,
[EMAIL PROTECTED] writes:
> It is rather trivial to construct a GList of hash table keys (or
> values) using g_hash_table_foreach. Of course it's only useful on
> a table whose contents change never or seldom because the list
> has to be updated on each change. Anyway, here's what I use. I
>
On 14 Jan 2004, Sven Neumann wrote:
> Hi,
>
> [EMAIL PROTECTED] writes:
>
> > It is rather trivial to construct a GList of hash table keys (or
> > values) using g_hash_table_foreach. Of course it's only useful on
> > a table whose contents change never or seldom because the list
> > has to be
Sven Neumann wrote:
Hi,
Tony Yat-Tung Cheung <[EMAIL PROTECTED]> writes:
Currently, there is g_hash_table_size(), we could easily add iteration
by providing the following two new APIs,
gconstpointer g_hash_table_get_key(GHashTable *hash_table, int pos);
gconspointer g_hash_table
[EMAIL PROTECTED] wrote:
I only see the the g_hash_table_foreach() here. But sometimes people may
like to iterate through a hash table and stop the iteration when certain
conditions are met.
It is rather trivial to construct a GList of hash table keys (or
values) using g_ha
Hi,
Tony Yat-Tung Cheung <[EMAIL PROTECTED]> writes:
> Yes, the proposed API may expose too much implementation details in
> some views. For perfect API, one may want to use an iterator, instead
> of an integer index. Then APIs will become,
>
> gconstpointer g_hash_table_get_key(GHashTable *hash
On Wed, Jan 14, 2004 at 10:02:54PM +0800, Tony Yat-Tung Cheung wrote:
> Hi,
>
> Is there any API for iterating GHashTable?
>
> I only see the the g_hash_table_foreach() here. But sometimes people may
> like to iterate through a hash table and stop the iteration when certain
> conditions are met.
10 matches
Mail list logo