projects
/
m6w6
/
ext-psi
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
7d79fea
)
flush
author
Michael Wallner
<mike@php.net>
Thu, 15 Oct 2015 14:48:32 +0000
(16:48 +0200)
committer
Michael Wallner
<mike@php.net>
Thu, 15 Oct 2015 14:48:32 +0000
(16:48 +0200)
Makefile.frag
patch
|
blob
|
history
src/compiler.c
patch
|
blob
|
history
diff --git
a/Makefile.frag
b/Makefile.frag
index 79af1be30d759bc6147f83426290a480754da552..99f708aec56338585dfe85e25703520975d2c3ea 100644
(file)
--- 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
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 $<
$(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 0c5fcb5e63d35a5b3675774c56b84ea617928b4b..660c968c3d138ae534bfcd9153c29942628edf66 100644
(file)
--- 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;
}
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;
typedef struct PSI_ClosureData {
void *context;
impl *impl;