ListG.removeLink

Removes an element from a GList, without freeing the element. The removed element's prev and next links are set to NULL, so that it becomes a self-contained list with one element.

This function is for example used to move an element in the list (see the example for g_list_concat()) or to remove an element in the list before freeing its data:

list = g_list_remove_link (list, llink);
free_some_data_that_may_access_the_list_again (llink->data);
g_list_free (llink);
class ListG
removeLink

Parameters

an element in the GList

Return Value

Type: ListG

the (possibly changed) start of the GList