mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 23:13:40 +02:00
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/.
This commit is contained in:
14
glib/gtree.c
14
glib/gtree.c
@@ -83,7 +83,7 @@ static GTreeNode* g_tree_node_rotate_right (GTreeNode *node);
|
||||
static void g_tree_node_check (GTreeNode *node);
|
||||
|
||||
|
||||
static G_LOCK_DEFINE(g_tree_global);
|
||||
G_LOCK_DECLARE_STATIC (g_tree_global);
|
||||
static GMemChunk *node_mem_chunk = NULL;
|
||||
static GTreeNode *node_free_list = NULL;
|
||||
|
||||
@@ -94,7 +94,7 @@ g_tree_node_new (gpointer key,
|
||||
{
|
||||
GTreeNode *node;
|
||||
|
||||
g_lock (g_tree_global);
|
||||
G_LOCK (g_tree_global);
|
||||
if (node_free_list)
|
||||
{
|
||||
node = node_free_list;
|
||||
@@ -110,7 +110,7 @@ g_tree_node_new (gpointer key,
|
||||
|
||||
node = g_chunk_new (GTreeNode, node_mem_chunk);
|
||||
}
|
||||
g_unlock (g_tree_global);
|
||||
G_UNLOCK (g_tree_global);
|
||||
|
||||
node->balance = 0;
|
||||
node->left = NULL;
|
||||
@@ -128,10 +128,10 @@ g_tree_node_destroy (GTreeNode *node)
|
||||
{
|
||||
g_tree_node_destroy (node->right);
|
||||
g_tree_node_destroy (node->left);
|
||||
g_lock (g_tree_global);
|
||||
G_LOCK (g_tree_global);
|
||||
node->right = node_free_list;
|
||||
node_free_list = node;
|
||||
g_unlock (g_tree_global);
|
||||
G_UNLOCK (g_tree_global);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -385,10 +385,10 @@ g_tree_node_remove (GTreeNode *node,
|
||||
node = g_tree_node_restore_right_balance (new_root, old_balance);
|
||||
}
|
||||
|
||||
g_lock (g_tree_global);
|
||||
G_LOCK (g_tree_global);
|
||||
garbage->right = node_free_list;
|
||||
node_free_list = garbage;
|
||||
g_unlock (g_tree_global);
|
||||
G_UNLOCK (g_tree_global);
|
||||
}
|
||||
else if (cmp < 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user