GLib.List.insert_before
Description: Reference for GLib.List.insert_before

### Function

# GLib Listinsert_before

#### Declaration [src]

    GList*
    g_list_insert_before (
      GList* list,
      GList* sibling,
      gpointer data
    )

#### Description [src]

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

This function is not directly available to language bindings.

#### Parameters

`list`

  Type: A list of `gpointer`

  A pointer to a `GList`, this must point to the top of the list.

  The data is owned by the caller of the function.

`sibling`

  Type: A list of `gpointer`

  The list element before which the new element is inserted or `NULL` to insert at the end of the list.

  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.

#### Return value

Type: A list of `gpointer`

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

The data is owned by the called function.