From: Sebastian Dröge Date: Fri, 27 Dec 2013 11:55:02 +0000 (+0100) Subject: parse: Use GLib malloc/free/realloc functions X-Git-Tag: 1.3.1~261 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c3181fa5df967cc67f3323b20c3cc2f71aff4b03;p=platform%2Fupstream%2Fgstreamer.git parse: Use GLib malloc/free/realloc functions https://bugzilla.gnome.org/show_bug.cgi?id=720100 --- diff --git a/gst/parse/Makefile.am b/gst/parse/Makefile.am index 9227408..8dd1d9c 100644 --- a/gst/parse/Makefile.am +++ b/gst/parse/Makefile.am @@ -14,7 +14,7 @@ EXTRA_DIST = \ nodist_libgstparse_la_SOURCES = lex.priv_gst_parse_yy.c grammar.tab.c CLEANFILES += grammar.tab.c lex.priv_gst_parse_yy.c -libgstparse_la_CFLAGS = $(GST_ALL_CFLAGS) +libgstparse_la_CFLAGS = $(GST_ALL_CFLAGS) -DYYMALLOC=g_malloc -DYYFREE=g_free libgstparse_la_LIBADD = $(GST_ALL_LIBS) noinst_HEADERS = grammar.tab.h parse_lex.h types.h diff --git a/gst/parse/parse.l b/gst/parse/parse.l index bcd6527..97b8cce 100644 --- a/gst/parse/parse.l +++ b/gst/parse/parse.l @@ -11,6 +11,22 @@ #include "../gsturi.h" #include "grammar.tab.h" +#ifdef malloc +#undef malloc +#endif + +#ifdef free +#undef free +#endif + +#ifdef realloc +#undef realloc +#endif + +#define malloc g_malloc +#define free g_free +#define realloc g_realloc + /* Override the default ECHO so as to avoid fortify warnings. Ignore the embedded-NUL case for now. We know yytext is NUL-terminated. */ #define ECHO g_fprintf(yyout, "%s", yytext)