We need the g_free symbol in the library
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Thu, 3 Sep 2009 15:06:28 +0000 (15:06 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Thu, 3 Sep 2009 15:06:28 +0000 (15:06 -0000)
svn path=/trunk/mono/; revision=141253

eglib/src/glib.h
eglib/src/gmem.c

index b840166cb18c07c8045d0668cbb4045497f85b03..ffd57d2953bc509fd0a345ae89222ed1fd990d49 100644 (file)
@@ -109,7 +109,7 @@ typedef uint16_t       gunichar2;
 /*
  * Allocation
  */
-#define g_free                  free
+void g_free (voir *ptr);
 static inline gpointer g_realloc (gpointer obj, gsize size) { if (!size) {g_free (obj); return 0;} return  realloc (obj, size);}
 static inline gpointer g_malloc (gsize x) {if (x) return malloc (x); else return 0;}
 static inline gpointer g_malloc0 (gsize x) {if (x) return calloc(1,x); else return 0;}
index 93c041ccb6d1ff0482bda1752de19addcda02310..beebd499e3620e768058f2822ea08353b59a46dd 100644 (file)
 #include <string.h>
 #include <glib.h>
 
+void
+g_free (void *ptr)
+{
+       if (ptr != NULL)
+               free (ptr);
+}
+
 gpointer
 g_memdup (gconstpointer mem, guint byte_size)
 {