bug in g_mem_set_vtable() ?
- From: Sven Neumann <sven gimp org>
- To: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: bug in g_mem_set_vtable() ?
- Date: 30 Jul 2001 12:57:18 +0200
Hi,
one of my collegues just pointed out a possible bug in glib/gmem.c.
Shouldn't the boolean vtable_set be declared static here?
Salut, Sven
Index: glib/gmem.c
===================================================================
RCS file: /cvs/gnome/glib/glib/gmem.c,v
retrieving revision 1.30
diff -u -r1.30 gmem.c
--- glib/gmem.c 2001/05/18 08:36:43 1.30
+++ glib/gmem.c 2001/07/30 10:49:32
@@ -224,11 +224,11 @@
void
g_mem_set_vtable (GMemVTable *vtable)
{
- gboolean vtable_set = FALSE;
+ static gboolean vtable_set = FALSE;
if (!vtable_set)
{
- vtable_set |= TRUE;
+ vtable_set = TRUE;
if (vtable->malloc && vtable->realloc && vtable->free)
{
glib_mem_vtable.malloc = vtable->malloc;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]