diff options
author | bloodstalker <thabogre@gmail.com> | 2018-10-03 11:48:45 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2018-10-03 11:48:45 +0000 |
commit | 919391929752a2e8d38228a29c6fe7c8bc9586e1 (patch) | |
tree | 51c1eaef90f97a4fe4b0cdce4be3f947739724d3 | |
parent | fix (diff) | |
download | luatablegen-919391929752a2e8d38228a29c6fe7c8bc9586e1.tar.gz luatablegen-919391929752a2e8d38228a29c6fe7c8bc9586e1.zip |
fix
-rwxr-xr-x | luatablegen.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/luatablegen.py b/luatablegen.py index 559a8c5..8fe0228 100755 --- a/luatablegen.py +++ b/luatablegen.py @@ -718,7 +718,9 @@ class TbgParser(object): dummy = "lua_checkstack(__ls, 3);\nlua_newtable(__ls);\n" dummy += "for (uint64_t i = 0; i < dummy->" + count_replacer + " ; ++i) {\nlua_pushinteger(__ls, i+1);\n" if ref_node_type != None: - dummy += ref_node_type.attrib["name"]+ "_push_args(__ls, dummy->"+field_name+"[i]);\nnew_" + ref_node_type.attrib["name"] + "(__ls);\n" + dummy += "if (dummy->" +field_name+ "[i] != NULL) {\n" + dummy += ref_node_type.attrib["name"]+ "_push_args(__ls, dummy->"+field_name+"[i]);\n"+"} else {\nlua_pop(__ls, 1);\n break;\n}" + dummy += "new_" + ref_node_type.attrib["name"] + "(__ls);\n" else: eq_lua_type = get_eq_lua_type(field_type) dummy += "lua_push"+eq_lua_type+"(__ls, dummy->"+field_name+"[i]);\n" |