From 018ba1edbb2a1bc16eec3e2107f292392f501b0b Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Sun, 20 Jan 2019 14:46:51 +0330 Subject: update --- main.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'main.py') diff --git a/main.py b/main.py index a8302cc..8e3b474 100755 --- a/main.py +++ b/main.py @@ -575,6 +575,7 @@ class CodeGen(object): void_source.write("#include \n") void_source.write('#include "aggregate.h"\n') if self.argparser.args.calloc: void_source.write(text.ft_calloc_def) + if self.argparser.args.luaalloc: void_source.write(text.ft_luanewuserdata_def) #void_source.write("void** void_train;\n") #void_source.write("uint64_t current_void_size = 0U;\n") #void_source.write("uint64_t current_void_count = 0U;\n") @@ -801,6 +802,7 @@ class CodeGen(object): struct_source_c.write('#include "stdio.h"\n') struct_source.write('#include \n') if self.argparser.args.calloc: struct_source_c.write(text.ft_calloc_def) + elif self.argparser.args.luaalloc: struct_source_c.write(text.ft_luanewuserdata_def) struct_source.write(text.header_inttype) struct_source_c.write(text.c_read_leb_u_def + "\n") struct_source_c.write(text.c_read_leb_s_def + "\n") -- cgit v1.2.3