HashTable.foreach_

Calls the given function for each of the key/value pairs in the glib.HashTable The function is passed the key and value of each pair, and the given user_data parameter. The hash table may not be modified while iterating over it (you can't add/remove items). To remove all items matching a predicate, use HashTable.foreachRemove.

The order in which HashTable.foreach iterates over the keys/values in the hash table is not defined.

See HashTable.find for performance caveats for linear order searches in contrast to HashTable.lookup.

class HashTable
void
foreach_

Parameters

func GHFunc

the function to call for each key/value pair

userData void*

user data to pass to the function