The return value is the new start of the list, which
may have changed, so make sure you store the new value.
|[<!-- language="C" -->
// Notice that it is initialized to the empty list.
GSList *list = NULL;
list = g_slist_prepend (list, "last");
list = g_slist_prepend (list, "first");
]|
Adds a new element on to the start of the list.
The return value is the new start of the list, which may have changed, so make sure you store the new value.
|[<!-- language="C" --> // Notice that it is initialized to the empty list. GSList *list = NULL; list = g_slist_prepend (list, "last"); list = g_slist_prepend (list, "first"); ]|