aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-09-25 12:04:50 +0000
committerbloodstalker <thabogre@gmail.com>2018-09-25 12:04:50 +0000
commit66e1d73de5160333a8552f4e28027e8dcd69cb3b (patch)
tree6629b384a21e78fa09977c82eca216a67d0ff18a
parentfix (diff)
downloadluatablegen-66e1d73de5160333a8552f4e28027e8dcd69cb3b.tar.gz
luatablegen-66e1d73de5160333a8552f4e28027e8dcd69cb3b.zip
fix
-rwxr-xr-xluatablegen.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/luatablegen.py b/luatablegen.py
index 5ba6b88..664b6ec 100755
--- a/luatablegen.py
+++ b/luatablegen.py
@@ -648,19 +648,19 @@ class TbgParser(object):
count_node = get_count_node(child, parent)
count_node_name = str()
if count_node != None: count_node_name = count_node.attrib["name"]
+ ref_node_type = get_def_node_tag(child.attrib["type"][6:], self.elems)
if not child:
for kid in parent:
if kid.attrib["name"] == field_name: child = kid
if lua_type == "integer": dummy = "\tlua_pushinteger(__ls, dummy->"+field_name+");\n"
elif lua_type == "lightuserdata":
if count == 1:
- dummy = "\tlua_pushlightuserdata(__ls, dummy->"+field_name+");\n"
+ dummy = ref_node_type.attrib["name"]+ "_push_args(__ls, dummy->"+field_name+");\nnew_" + ref_node_type.attrib["name"] + "(__ls);\n"
else:
count_replacer = str()
if count > 1: count_replacer = repr(count)
else:
count_replacer = count_node_name
- ref_node_type = get_def_node_tag(child.attrib["type"][6:], self.elems)
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: