diff options
author | Tim Janik <timj@gtk.org> | 1998-12-16 05:38:35 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 1998-12-16 05:38:35 +0000 |
commit | b2e318ff3ecc50d72121a4e8561442a6d79a7a84 (patch) | |
tree | 87b800eae111a2ace0cde58292ae72fea3a8c19d /garray.c | |
parent | 06600bd0e6b82639410394ed6b5ebb1189cfdeb3 (diff) | |
download | glib-b2e318ff3ecc50d72121a4e8561442a6d79a7a84.tar.gz |
version bump to 1.1.8, binary age 0, interface age 0.
Wed Dec 16 03:16:58 1998 Tim Janik <timj@gtk.org>
* configure.in: version bump to 1.1.8, binary age 0, interface age 0.
* glib.h: changed g_lock() to G_LOCK(), g_unlock() to G_UNLOCK() and
g_trylock() to G_TRYLOCK(), since these are macros that expand to
nothing with --disable-threads.
changed G_LOCK_DEFINE() to G_LOCK_DECLARE() and introduced
G_LOCK_DECLARE_STATIC() to achive the results of static G_LOCK_DECLARE().
changed semantics of g_thread_supported to g_thread_supported() so it
can be used as a function like g_module_supported(). the actuall
definition is still a macro that expands into a variable for
performance reasons though.
various indentation and coding style cleanups.
* configure.in: added --enable-threads that defaults to yes.
* gmutex.c: changed tests g_thread_supported to g_thread_supported (),
changed variable settings of g_thread_supported
to g_threads_got_initialized.
garray.c:
gcache.c:
gdataset.c:
gdate.c:
ghash.c:
glist.c:
gmain.c:
gnode.c:
gslist.c:
gstring.c:
gtree.c:
gutils.c:
changed s/g_lock/G_LOCK/, s/g_unlock/G_UNLOCK/,
s/static G_LOCK_DEFINE/G_LOCK_DECLARE_STATIC/.
Diffstat (limited to 'garray.c')
-rw-r--r-- | garray.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -46,7 +46,7 @@ static void g_array_maybe_expand (GRealArray *array, gint len); static GMemChunk *array_mem_chunk = NULL; -static G_LOCK_DEFINE(array_mem_chunk); +G_LOCK_DECLARE_STATIC (array_mem_chunk); GArray* g_array_new (gboolean zero_terminated, @@ -55,14 +55,14 @@ g_array_new (gboolean zero_terminated, { GRealArray *array; - g_lock (array_mem_chunk); + G_LOCK (array_mem_chunk); if (!array_mem_chunk) array_mem_chunk = g_mem_chunk_new ("array mem chunk", sizeof (GRealArray), 1024, G_ALLOC_AND_FREE); array = g_chunk_new (GRealArray, array_mem_chunk); - g_unlock (array_mem_chunk); + G_UNLOCK (array_mem_chunk); array->data = NULL; array->len = 0; @@ -81,9 +81,9 @@ g_array_free (GArray *array, if (free_segment) g_free (array->data); - g_lock (array_mem_chunk); + G_LOCK (array_mem_chunk); g_mem_chunk_free (array_mem_chunk, array); - g_unlock (array_mem_chunk); + G_UNLOCK (array_mem_chunk); } GArray* @@ -250,7 +250,7 @@ static void g_ptr_array_maybe_expand (GRealPtrArray *array, gint len); static GMemChunk *ptr_array_mem_chunk = NULL; -static G_LOCK_DEFINE(ptr_array_mem_chunk); +G_LOCK_DECLARE_STATIC (ptr_array_mem_chunk); GPtrArray* @@ -258,14 +258,14 @@ g_ptr_array_new (void) { GRealPtrArray *array; - g_lock (ptr_array_mem_chunk); + G_LOCK (ptr_array_mem_chunk); if (!ptr_array_mem_chunk) ptr_array_mem_chunk = g_mem_chunk_new ("array mem chunk", sizeof (GRealPtrArray), 1024, G_ALLOC_AND_FREE); array = g_chunk_new (GRealPtrArray, ptr_array_mem_chunk); - g_unlock (ptr_array_mem_chunk); + G_UNLOCK (ptr_array_mem_chunk); array->pdata = NULL; array->len = 0; @@ -283,9 +283,9 @@ g_ptr_array_free (GPtrArray *array, if (free_segment) g_free (array->pdata); - g_lock (ptr_array_mem_chunk); + G_LOCK (ptr_array_mem_chunk); g_mem_chunk_free (ptr_array_mem_chunk, array); - g_unlock (ptr_array_mem_chunk); + G_UNLOCK (ptr_array_mem_chunk); } static void |