From: Michael Wallner Date: Thu, 15 Oct 2015 14:48:32 +0000 (+0200) Subject: flush X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=commitdiff_plain;h=3013555bce1419702ada905aa6829fac285cf118 flush --- 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;