From 3013555bce1419702ada905aa6829fac285cf118 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Thu, 15 Oct 2015 16:48:32 +0200 Subject: [PATCH] flush --- Makefile.frag | 1 + src/compiler.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/Makefile.frag b/Makefile.frag index 79af1be..99f708a 100644 --- a/Makefile.frag +++ b/Makefile.frag @@ -22,6 +22,7 @@ lemon.c: curl -sSo $@ "http://www.sqlite.org/src/raw/tool/lemon.c?name=039f813b520b9395740c52f9cbf36c90b5d8df03" ./lemon: lemon.c | lempar.c + $(CC) -o $@ $< $(PHP_PSI_SRCDIR)/src/parser_proc.c: $(PHP_PSI_SRCDIR)/src/parser_proc.y $(LEMON) $(LEMON) -c $< diff --git a/src/compiler.c b/src/compiler.c index 0c5fcb5..660c968 100644 --- a/src/compiler.c +++ b/src/compiler.c @@ -21,6 +21,20 @@ PSI_Compiler *PSI_CompilerInit(PSI_Compiler *C, PSI_Validator *V, void *context) return C; } +void PSI_CompilerDtor(PSI_Compiler *C) +{ + PSI_DataDtor((PSI_Data *) C); +} + +void PSI_Compiler_Free(PSI_Compiler **C) +{ + if (*C) { + PSI_CompilerDtor(*C); + free(*C); + *C = NULL; + } +} + typedef struct PSI_ClosureData { void *context; impl *impl; -- 2.30.2