From 67daf2c66795b057d6e9d227eded2a3a9486e4f4 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sat, 9 May 2009 15:04:48 +0800 Subject: [PATCH] For consistency, use gnulib's memory allocation functions in the gui. --- src/ui/gui/main.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/ui/gui/main.c b/src/ui/gui/main.c index 71b9fbdc..05cc421b 100644 --- a/src/ui/gui/main.c +++ b/src/ui/gui/main.c @@ -15,6 +15,7 @@ along with this program. If not, see . */ #include +#include #include #include "psppire.h" #include "progname.h" @@ -130,6 +131,15 @@ run_inner_loop (gpointer data) } +static GMemVTable vtable = + { + xmalloc, + xrealloc, + free, + xcalloc, + malloc, + realloc + }; int main (int argc, char *argv[]) @@ -142,8 +152,11 @@ main (int argc, char *argv[]) set_program_name (argv[0]); + g_mem_set_vtable (&vtable); + gtk_disable_setlocale (); + if ( ! gtk_parse_args (&argc, &argv) ) { perror ("Error parsing arguments"); -- 2.30.2