1998-12-15  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* Makefile.am (EXTRA_DIST): updated.

	* testgthread.c, gthread-*.c: Changed private to private_key to
	avoid problems when compiling with under C++.
This commit is contained in:
Sebastian Wilhelmi
1998-12-15 17:49:30 +00:00
committed by Sebastian Wilhelmi
parent 961205a025
commit 2c30e8620f
6 changed files with 48 additions and 40 deletions

View File

@@ -143,7 +143,7 @@ private_destructor (gpointer data)
g_free (real);
}
GStaticPrivate private;
GStaticPrivate private_key;
void
test_private_func (void *data)
@@ -153,15 +153,15 @@ test_private_func (void *data)
while (i < TEST_PRIVATE_ROUNDS)
{
guint random_value = rand () % 10000;
guint *data = g_static_private_get (&private);
guint *data = g_static_private_get (&private_key);
if (!data)
{
data = private_constructor ();
g_static_private_set (&private, data, private_destructor);
g_static_private_set (&private_key, data, private_destructor);
}
*data = random_value;
wait_thread (.2);
g_assert (*(guint *) g_static_private_get (&private) == random_value);
g_assert (*(guint *) g_static_private_get (&private_key) == random_value);
i++;
}
}