Function

GLibListindex

Declaration [src]

gint
g_list_index (
  GList* list,
  gconstpointer data
)

Description [src]

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 GList, this must point to the top of the list.

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.