### Function

# GLib int_hash

since: 2.0

#### Declaration

    guint
    g_int_hash (
      gconstpointer v
    )

#### Description

Converts a pointer to a #gint to a hash value. It can be passed to `g_hash_table_new()` as the `hash_func` parameter, when using non-`NULL` pointers to integer values as keys in a `GHashTable`.

Note that this function acts on pointers to #gint, not on #gint directly: if your hash table’s keys are of the form `GINT_TO_POINTER (n)`, use `g_direct_hash()` instead.

Available since: 2.0

#### Parameters

`v`

  Type: `gconstpointer`

  A pointer to a #gint key.

  The data is owned by the caller of the function.

#### Return value

Type: `guint`

A hash value corresponding to the key.