diff options
author | bloodstalker <thabogre@gmail.com> | 2018-12-15 17:21:52 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2018-12-15 17:21:52 +0000 |
commit | 0f9de35281cdbdca756cf7a2af73f655c036796c (patch) | |
tree | ac07b5b6b92d5327011ad361828c3a461175e2a4 | |
parent | update (diff) | |
download | luatablegen-0f9de35281cdbdca756cf7a2af73f655c036796c.tar.gz luatablegen-0f9de35281cdbdca756cf7a2af73f655c036796c.zip |
update
-rwxr-xr-x | luatablegen.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/luatablegen.py b/luatablegen.py index 2491eff..2f4665b 100755 --- a/luatablegen.py +++ b/luatablegen.py @@ -799,7 +799,7 @@ class TbgParser(object): type_replacement = simple_type_resovler(node.attrib["type"]) #dummy += "dummy->" +field_name+ "=calloc(sizeof(" +type_replacement+ ")*table_length,1);\n" if count == 1: - dummy += "free(dummy->" + field_name + ");\n" + #dummy += "free(dummy->" + field_name + ");\n" dummy += "dummy->" +field_name+ "=calloc(sizeof(" +type_replacement+ "),1);\n" dummy += "dummy->" + field_name + "= luaL_checkudata(__ls, -1,\""+type_replacement+"\");\n" dummy += "lua_pop(__ls, 1);\n" @@ -846,7 +846,7 @@ class TbgParser(object): dummy += "dummy->" +field_name+ "=calloc(sizeof(" +simple_type_resovler(con_child.attrib["type"])+ "),1);\n" lua_push_func_str = get_lua_pop_func(real_type_string) dummy += "dummy->" + field_name + "="+ lua_push_func_str.replace("XXX", "-1")+";}\n" - dummy += "lua_pop(__ls, 1);\n" + #dummy += "lua_pop(__ls, 1);\n" # FIXME- not implemented for count greater than one else: dummy = "if (!lua_checkstack(__ls, 3)) {printf(\"error\"\n);return 0;}\n" |