Function

GLibSListindex

Declaration

gint
g_slist_index (
  GSList* list,
  gconstpointer data
)

Description

Gets the position of the element containing the given data (starting from 0).

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: gconstpointer

The data to find.

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

Return value

Type: gint

The index of the element containing the data, or -1 if the data is not found.