### Function

# GLib direct_equal

#### Declaration [src]

    gboolean
    g_direct_equal (
      gconstpointer v1,
      gconstpointer v2
    )

#### Description [src]

Compares two #gpointer arguments and returns `TRUE` if they are equal. It can be passed to `g_hash_table_new()` as the `key_equal_func` parameter, when using opaque pointers compared by pointer value as keys in a `GHashTable`.

This equality function is also appropriate for keys that are integers stored in pointers, such as `GINT_TO_POINTER (n)`.

#### Parameters

`v1`

  Type: `gconstpointer`

  A key.

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

`v2`

  Type: `gconstpointer`

  A key to compare with `v1`.

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

#### Return value

Type: `gboolean`

`TRUE` if the two keys match.