### Function

# GLib SList foreach

#### Declaration [src]

    void
    g_slist_foreach (
      GSList* list,
      GFunc func,
      gpointer user_data
    )

#### Description [src]

Calls a function for each element of a `GSList`.

It is safe for `func` to remove the element from `list`, but it must not modify any part of the list after that element.

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.

`func`

  Type: `GFunc`

  The function to call with each element’s data.

`user_data`

  Type: `gpointer`

  User data to pass to the function.

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