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 glib.HashTable, 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 glib.HashTable more efficiently, use a glib.HashTableIter

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 HashTable.stealAll first to transfer ownership of the keys.

class HashTable
void*[]
getKeysAsArray
()

Return Value

Type: void*[]

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

Meta

Since

2.40