### Function Macro

# GLib datalist_id_set_data

since: 2.0

#### Declaration

    #define g_datalist_id_set_data (
      dl,
      q,
      d
    )

#### Description

Sets the data corresponding to the given `GQuark` id. Any previous data with the same key is removed, and its destroy function is called.

Available since: 2.0

This function is not directly available to language bindings.

#### Parameters

`dl`

  Type: `-`

  A datalist.

`q`

  Type: `-`

  The `GQuark` to identify the data element.

`d`

  Type: `-`

  The data element, or `NULL` to remove any previous element corresponding to `q`.