Function

GLibHashTablesteal_extended

Declaration

gboolean
g_hash_table_steal_extended (
  GHashTable* hash_table,
  gconstpointer lookup_key,
  gpointer* stolen_key,
  gpointer* stolen_value
)

Description

Looks up a key in the GHashTable, stealing the original key and the associated value and returning TRUE if the key was found. If the key was not found, FALSE is returned.

If found, the stolen key and value are removed from the hash table without calling the key and value destroy functions, and ownership is transferred to the caller of this method; as with g_hash_table_steal().

You can pass NULL for lookup_key, provided the hash and equal functions of hash_table are NULL-safe.

Available since:2.58

Parameters

hash_table

Type: GHashTable

A GHashTable.

The data is owned by the caller of the function.
lookup_key

Type: gconstpointer

The key to look up.

The argument can be NULL.
The data is owned by the caller of the function.
stolen_key

Type: gpointer*

Return location for the original key.

The argument will be set by the function.
The argument can be NULL.
stolen_value

Type: gpointer*

Return location for the value associated with the key.

The argument will be set by the function.
The argument can be NULL.

Return value

Type: gboolean

TRUE if the key was found in the GHashTable.