g_[s]list_pop() ?
- From: Owen Taylor <otaylor redhat com>
- To: gtk-devel-list redhat com
- Subject: g_[s]list_pop() ?
- Date: Fri, 27 Nov 1998 11:53:20 -0500
I've noticed that I pretty frequently do code like:
GSList *tmp = drag_widgets;
result = drag_widgets->data;
drag_widgets = drag_widgets->next;
g_slist_free_1 (tmp);
and I think it would be nice to have something
to make this easier.
Is:
result = drag_widgets->data;
drag_widgets = g_slist_pop (drag_widgets);
or:
result = drag_widgets->data;
drag_widgets = g_slist_delete_link (drag_widgets, drag_widgets);
better? Or should we have both?
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]