HashTable.getKeysAsArray

Retrieves every key inside @hash_table, as an array.

The returned array is %NULL-terminated but may contain %NULL as a key. Use @length to determine the true length if it's possible that %NULL was used as the value for a key.

Note: in the common case of a string-keyed #GHashTable, the return value of this function can be conveniently cast to (const gchar **).

This iterates over every entry in the hash table to build its return value. To iterate over the entries in a #GHashTable more efficiently, use a #GHashTableIter.

You should always free the return result with g_free(). In the above-mentioned case of a string-keyed hash table, it may be appropriate to use g_strfreev() if you call g_hash_table_steal_all() first to transfer ownership of the keys.

Return: a %NULL-terminated array containing each key from the table.

class HashTable
void*[]
getKeysAsArray
()

Meta

Since

2.40