summaryrefslogtreecommitdiff
path: root/gslist.c
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>1999-07-24 18:50:58 +0000
committerTim Janik <timj@src.gnome.org>1999-07-24 18:50:58 +0000
commit87c7aeb93bd654776f59805a342ad913031034f3 (patch)
tree4f43e0cefcbe83a51ffe9aeb24f3386f519a071d /gslist.c
parentc8a28b935ca605ece11c65564ad1d3918786dd07 (diff)
downloadglib-87c7aeb93bd654776f59805a342ad913031034f3.tar.gz
18:36. incorporated proposed cleanups from gtk-devel-list.
Sat Jul 24 20:11:35 1999 Tim Janik <timj@gtk.org> * merged GLib 1.3.0 with glib-1.2.3 from Fri Jul 16 22:18:36. * incorporated proposed cleanups from gtk-devel-list. * bumped version number to GLib-1.3.1 * glib.h: * gqueue.c: * gstring.c: * glist.c: removed string tokenisation (we got g_strsplit() and g_strjoin() already) and readline functions. s/g_list_delete/g_list_delete_link. implemented g_slist_delete_link. removed notion of g_ATEXIT() macro in glib.h, this is an *internal* macro, g_atexit() is provided for public consumption. added GTrashStack inline utility functions. reimplement double eneded queues. removed GStack implementation, people can use a queue or a (singly) linked list for this task. deprecated g_strescape(), we need the SunOS variants here. * gdate.c: added DEBUG_MSG() macro to wrap old messages. * *.*: CVS merges. * upgrade to libtool 1.3.3.
Diffstat (limited to 'gslist.c')
-rw-r--r--gslist.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/gslist.c b/gslist.c
index ef5615f67..a89f477fb 100644
--- a/gslist.c
+++ b/gslist.c
@@ -100,7 +100,7 @@ g_slist_pop_allocator (void)
G_UNLOCK (current_allocator);
}
-GSList*
+inline GSList*
g_slist_alloc (void)
{
GSList *list;
@@ -153,7 +153,7 @@ g_slist_free (GSList *list)
}
}
-void
+inline void
g_slist_free_1 (GSList *list)
{
if (list)
@@ -290,7 +290,7 @@ g_slist_remove (GSList *list,
return list;
}
-GSList*
+inline GSList*
g_slist_remove_link (GSList *list,
GSList *link)
{
@@ -321,6 +321,16 @@ g_slist_remove_link (GSList *list,
}
GSList*
+g_slist_delete_link (GSList *list,
+ GSList *link)
+{
+ list = g_slist_remove_link (list, link);
+ g_slist_free_1 (link);
+
+ return list;
+}
+
+GSList*
g_slist_copy (GSList *list)
{
GSList *new_list = NULL;