GLib.SList.insert
Description: Reference for GLib.SList.insert

### Function

# GLib SListinsert

#### Declaration [src]

    GSList*
    g_slist_insert (
      GSList* list,
      gpointer data,
      gint position
    )

#### Description [src]

Inserts a new element into the list at the given position.

This function is not directly available to language bindings.

#### Parameters

`list`

  Type: A list of `gpointer`

  A `GSList`.

  The data is owned by the caller of the function.

`data`

  Type: `gpointer`

  The data for the new element.

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

`position`

  Type: `gint`

  The position to insert the element. If this is negative, or is larger than the number of elements in the list, the new element is added on to the end of the list.

#### Return value

Type: A list of `gpointer`

The (possibly changed) start of the `GSList`.

The data is owned by the called function.