Only set vtable_set if the vtable is set.

This commit is contained in:
Matthias Clasen 2004-10-04 20:19:30 +00:00
parent 6c751a8924
commit 8dc560a739
6 changed files with 26 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2004-10-04 Matthias Clasen <mclasen@redhat.com>
* glib/gmem.c (g_mem_set_vtable): Only set vtable_set if the
vtable is set. (#154352, Philippe Blain)
2004-10-03 Anders Carlsson <andersca@gnome.org>
* glib/goption.c: (parse_arg):

View File

@ -1,3 +1,8 @@
2004-10-04 Matthias Clasen <mclasen@redhat.com>
* glib/gmem.c (g_mem_set_vtable): Only set vtable_set if the
vtable is set. (#154352, Philippe Blain)
2004-10-03 Anders Carlsson <andersca@gnome.org>
* glib/goption.c: (parse_arg):

View File

@ -1,3 +1,8 @@
2004-10-04 Matthias Clasen <mclasen@redhat.com>
* glib/gmem.c (g_mem_set_vtable): Only set vtable_set if the
vtable is set. (#154352, Philippe Blain)
2004-10-03 Anders Carlsson <andersca@gnome.org>
* glib/goption.c: (parse_arg):

View File

@ -1,3 +1,8 @@
2004-10-04 Matthias Clasen <mclasen@redhat.com>
* glib/gmem.c (g_mem_set_vtable): Only set vtable_set if the
vtable is set. (#154352, Philippe Blain)
2004-10-03 Anders Carlsson <andersca@gnome.org>
* glib/goption.c: (parse_arg):

View File

@ -1,3 +1,8 @@
2004-10-04 Matthias Clasen <mclasen@redhat.com>
* glib/gmem.c (g_mem_set_vtable): Only set vtable_set if the
vtable is set. (#154352, Philippe Blain)
2004-10-03 Anders Carlsson <andersca@gnome.org>
* glib/goption.c: (parse_arg):

View File

@ -248,7 +248,6 @@ g_mem_set_vtable (GMemVTable *vtable)
{
if (!vtable_set)
{
vtable_set = TRUE;
if (vtable->malloc && vtable->realloc && vtable->free)
{
glib_mem_vtable.malloc = vtable->malloc;
@ -257,6 +256,7 @@ g_mem_set_vtable (GMemVTable *vtable)
glib_mem_vtable.calloc = vtable->calloc ? vtable->calloc : fallback_calloc;
glib_mem_vtable.try_malloc = vtable->try_malloc ? vtable->try_malloc : glib_mem_vtable.malloc;
glib_mem_vtable.try_realloc = vtable->try_realloc ? vtable->try_realloc : glib_mem_vtable.realloc;
vtable_set = TRUE;
}
else
g_warning (G_STRLOC ": memory allocation vtable lacks one of malloc(), realloc() or free()");