summaryrefslogtreecommitdiff
path: root/glib/glist.h
diff options
context:
space:
mode:
authorTim Janik <timj@imendio.com>2005-11-01 18:10:31 +0000
committerTim Janik <timj@src.gnome.org>2005-11-01 18:10:31 +0000
commit0cba1b531d5d28890fa4f48359d4e7adacf2a603 (patch)
treefa2a88ef5c43b20004851e2b9f3eb14cf10c71f2 /glib/glist.h
parent3a042a8959501f9e90df41fc31e3167dd7aa6222 (diff)
downloadglib-0cba1b531d5d28890fa4f48359d4e7adacf2a603.tar.gz
prepared deprecation of GMemChunk and GAllocator. added g_slice_*() API to
Tue Nov 1 16:24:20 2005 Tim Janik <timj@imendio.com> * glib/gmem.[hc]: prepared deprecation of GMemChunk and GAllocator. added g_slice_*() API to allocate and cache small bits of memory. an actuall allocator implementation for g_slice_*() is still pending. * glib/gthread.[hc]: changes from a patch by Matthias Clasen. changed GRealThread list to use in-structure *next; fields instead of GSList, in order for thread iteration to not depenend on g_slice_*() indirectly. _g_thread_mem_private_get(): _g_thread_mem_private_set(): added accessors for private memory, needed because the ordinary GPrivate implementation relies on GArray and GSList and therefore indirectly on working g_slice_*() allocations. * glib/gthread.[hc]: g_thread_foreach(): new public API function to loop over all existing threads. * glib/gdataset.c: * glib/gstring.c: * glib/gcache.c: * glib/garray.c: * glib/gqueue.c: * glib/gslist.c: * glib/glist.c: * glib/ghash.c: * glib/gtree.c: * glib/ghook.c: * glib/gmain.c: * glib/gnode.c: removed GAllocator and free list usages and accompanying locks. use g_slice_*() API to allocate and cache small bits of memory. * glib/ghook.h: removed GMemChunk field from public API. * glib/gslist.h: * glib/glist.h: deprecate allocator API, provide _free1() for consistency. * glib/gnode.h: deprecate allocator API. * glib/gmain.c: reordered GPollRec fields so g_slice_free_chain() can be used for poll rec lists. * glib/grel.c: removed mem chunk usage, and allocated tuples via g_slice_*(). g_relation_destroy(): free all tuples from the all_tuples hash table, this effectively maintains the life time track keeping of tuples. g_relation_delete_tuple(): free tuples which are removed from the all_tuples hash table. this fixes a temporary leak that was present in the memchunk code until the destruction of the relation.
Diffstat (limited to 'glib/glist.h')
-rw-r--r--glib/glist.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/glib/glist.h b/glib/glist.h
index 9434dde6e..fde99e569 100644
--- a/glib/glist.h
+++ b/glib/glist.h
@@ -42,11 +42,10 @@ struct _GList
/* Doubly linked lists
*/
-void g_list_push_allocator (GAllocator *allocator);
-void g_list_pop_allocator (void);
GList* g_list_alloc (void);
void g_list_free (GList *list);
void g_list_free_1 (GList *list);
+#define g_list_free1 g_list_free_1
GList* g_list_append (GList *list,
gpointer data);
GList* g_list_prepend (GList *list,
@@ -102,6 +101,10 @@ gpointer g_list_nth_data (GList *list,
#define g_list_previous(list) ((list) ? (((GList *)(list))->prev) : NULL)
#define g_list_next(list) ((list) ? (((GList *)(list))->next) : NULL)
+#ifndef G_DISABLE_DEPRECATED
+void g_list_push_allocator (gpointer allocator);
+void g_list_pop_allocator (void);
+#endif
G_END_DECLS
#endif /* __G_LIST_H__ */