GLib.datalist_get_data
Description: Reference for GLib.datalist_get_data

### Function

# GLibdatalist_get_data

since: 2.0

#### Declaration

    gpointer
    g_datalist_get_data (
      GData** datalist,
      const gchar* key
    )

#### Description

Gets a data element, using its string identifier. This is slower than `g_datalist_id_get_data()` because it compares strings.

Available since: 2.0

#### Parameters

`datalist`

  Type: `GData`

  A datalist.

  The data is owned by the caller of the function.

`key`

  Type: `const gchar*`

  The string identifying a data element.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

#### Return value

Type: `gpointer`

The data element, or `NULL` if it is not found.

The data is owned by the called function.
The return value can be `NULL`.