Function

GLibHashTablesteal_all_keys

since: 2.76

Declaration

GPtrArray*
g_hash_table_steal_all_keys (
  GHashTable* hash_table
)

Description

Removes all keys and their associated values from a GHashTable without calling the key destroy functions, returning the keys as a GPtrArray with the free func set to the hash_table key destroy function.

Available since: 2.76

This function is not directly available to language bindings.

Parameters

hash_table

Type: GHashTable

A GHashTable.

The data is owned by the caller of the function.

Return value

Type: An array of gpointer

A GPtrArray containing each key of the table. Unref with with g_ptr_array_unref() when done.

The caller of the function takes ownership of the data container, but not the data inside it.