2012-04-13 11 views

答えて

3

、どちらか

// pop and discard head 
list = g_slist_delete_link(list, list); 

または

// pop head but keep it for further use 
GSList *head = list; 
list = g_slist_remove_link(list, head); 
// do stuff with head 
g_slist_free1(head); 
2

g_queue_push_headg_queue_pop_headを持つdouble-ended queueを使用できます。

あなたのユースケースに応じて、
0
list = g_slist_remove(list, list->data); 
関連する問題