flush
[m6w6/ext-psi] / idl / compiler.c
index 725083617d0a5399c5b458b933f8cb580e83b38d..02f386704eca0aac9555be4f9e75bd5562a70009 100644 (file)
@@ -2,17 +2,13 @@
 
 #include "compiler.h"
 
 
 #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)
 {
 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;
 }
 }