X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=idl%2Fcompiler.c;h=02f386704eca0aac9555be4f9e75bd5562a70009;hp=725083617d0a5399c5b458b933f8cb580e83b38d;hb=9e0411db099e71409f0ee8a8f464aa34ac65c778;hpb=69008ba2a7733358974c8985caa2e5bcb1182fe1 diff --git a/idl/compiler.c b/idl/compiler.c index 7250836..02f3867 100644 --- a/idl/compiler.c +++ b/idl/compiler.c @@ -2,17 +2,13 @@ #include "compiler.h" -#if INTERFACE -typedef struct PSI_Compiler { - decl_typedefs *defs; - decls *decls; - impls *impls; - char *lib; - char *fn; -} PSI_Compiler; -#endif - PSI_Compiler *PSI_CompilerInit(PSI_Compiler *C, PSI_Validator *V) { + if (!C) { + C = malloc(sizeof(*C)); + } + memset(C, 0, sizeof(*C)); + PSI_DataExchange((PSI_Data *) C, (PSI_Data *) V); + return C; }