g_hash_table_get_keys()/g_hash_table_get_values()



Hi,

I fairly frequently do a g_hash_table_foreach() for the sole purpose
of getting a list of keys or values from a hash table. Python has
methods hash.keys() and hash.values() that return a list of keys or
values.

So, proposal for something I think would be nice:

 GSList* g_hash_table_get_keys   (GHashTable *table);
 GSList* g_hash_table_get_values (GHashTable *table);

The returned list must be freed.

Havoc





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