From b77c473f516486428fce3ea0166c1615f7e981b8 Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Sun, 20 Jan 2019 14:15:07 +0330 Subject: fix --- main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.py b/main.py index 9281efa..27b0b21 100755 --- a/main.py +++ b/main.py @@ -568,6 +568,8 @@ class CodeGen(object): void_source_h.write("\n// automatically generated by faultreiber\n") void_source.write("// " + self.dnt + "\n") void_source_h.write("// " + self.dnt + "\n") + if self.argparser.args.luaalloc: + void_source.write('#include "'+self.argparser.args.luaheaders+'"\n') void_source.write('#include "./structs.h"\n') void_source.write('#include "./read.h"\n') void_source.write("#include \n") @@ -579,6 +581,8 @@ class CodeGen(object): void_source_h.write('#ifndef FT_AGGREGATE_H\n#define FT_AGGREGATE_H\n') void_source_h.write('#ifdef __cplusplus\nextern "C" {\n#endif\n') void_source_h.write('#include "./structs.h"\n') + if self.argparser.args.luaalloc: + void_source_h.write('#include "'+self.argparser.args.luaheaders+'"\n') # generating the extern declarations and definitions void_source_h.write("typedef struct {\n") for elem in self.read_elems: -- cgit v1.2.3