Function
GLibListprepend
Declaration [src]
GList*
g_list_prepend (
GList* list,
gpointer data
)
Description [src]
Prepends a new element on to the start of the list.
Note that the return value is the new start of the list, which will have changed, so make sure you store the new value.
// Notice that it is initialized to the empty list.
GList *list = NULL;
list = g_list_prepend (list, "last");
list = g_list_prepend (list, "first");
Do not use this function to prepend a new element to a different
element than the start of the list. Use g_list_insert_before()
instead.
This function is not directly available to language bindings.