GLib.List.concat
Description: Reference for GLib.List.concat

### Function

# GLib Listconcat

#### Declaration [src]

    GList*
    g_list_concat (
      GList* list1,
      GList* list2
    )

#### Description [src]

Adds the second `GList` onto the end of the first `GList`. Note that the elements of the second `GList` are not copied. They are used directly.

This function is for example used to move an element in the list. The following example moves an element to the top of the list:

    list = g_list_remove_link (list, llink);
    list = g_list_concat (llink, list);

This function is not directly available to language bindings.

#### Parameters

`list1`

  Type: A list of `gpointer`

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

  The data is owned by the caller of the function.

`list2`

  Type: A list of `gpointer`

  The `GList` to add to the end of the first `GList`, this must point to the top of the list.

  The data is owned by the caller of the function.

#### Return value

Type: A list of `gpointer`

The start of the new `GList`, which equals `list1` if not `NULL`.

The data is owned by the called function.