Function

GLibdatalist_id_set_data_full

Declaration

void
g_datalist_id_set_data_full (
  GData** datalist,
  GQuark key_id,
  gpointer data,
  GDestroyNotify destroy_func
)

Description

Sets the data corresponding to the given GQuark id, and the function to be called when the element is removed from the datalist. Any previous data with the same key is removed, and its destroy function is called.

This function is not directly available to language bindings

Parameters

datalist

Type: GData

A datalist.

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

Type: GQuark

The GQuark to identify the data element.

data

Type: gpointer

The data element or NULL to remove any previous element corresponding to key_id.

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

Type: GDestroyNotify

The function to call when the data element is removed. This function will be called with the data element and can be used to free any memory allocated for it. If data is NULL, then destroy_func must also be NULL.

The argument can be NULL.