X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Fcompiler.c;fp=src%2Fcompiler.c;h=660c968c3d138ae534bfcd9153c29942628edf66;hp=0c5fcb5e63d35a5b3675774c56b84ea617928b4b;hb=3013555bce1419702ada905aa6829fac285cf118;hpb=7d79fea75fc664e54a5d5a2668a55f554296a845 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;