projects
/
m6w6
/
ext-psi
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
flush
[m6w6/ext-psi]
/
src
/
compiler.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;