mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 08:11:16 +00:00
parse: Use GLib malloc/free/realloc functions
https://bugzilla.gnome.org/show_bug.cgi?id=720100
This commit is contained in:
parent
d2e5953643
commit
c3181fa5df
2 changed files with 17 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue