aboutsummaryrefslogtreecommitdiffstats
path: root/luatablegen.py
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-12-31 21:49:11 +0000
committerbloodstalker <thabogre@gmail.com>2018-12-31 21:49:11 +0000
commit97ec923805bf88d3361168858e2f6274febf52d6 (patch)
treeef38fbfbb8d5a612d5487b98312dbefbafa57f0a /luatablegen.py
parentfix (diff)
downloadluatablegen-97ec923805bf88d3361168858e2f6274febf52d6.tar.gz
luatablegen-97ec923805bf88d3361168858e2f6274febf52d6.zip
update
Diffstat (limited to '')
-rwxr-xr-xluatablegen.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/luatablegen.py b/luatablegen.py
index d2c5e32..695aee1 100755
--- a/luatablegen.py
+++ b/luatablegen.py
@@ -736,7 +736,11 @@ class TbgParser(object):
if lua_type == "integer": dummy = "\tlua_pushinteger(__ls, dummy->"+field_name+");\n"
elif lua_type == "lightuserdata":
if count == 1:
- dummy = ref_node_type.attrib["name"]+ "_push_args(__ls, dummy->"+field_name+");\nnew_" + ref_node_type.attrib["name"] + "(__ls);\n"
+ dummy = "lua_pushlightuserdata(__ls, dummy->"+child.attrib["name"]+");\n"
+ dummy += 'lua_getmetatable(__ls, "'+ref_node_type.attrib["name"]+'");\n'
+ dummy += "lua_setmetatable(__ls, -2);\n"
+ #dummy = ref_node_type.attrib["name"]+ "_push_args(__ls, dummy->"+field_name+");\nnew_" + ref_node_type.attrib["name"] + "(__ls);\n"
+ #FIXME
else:
count_replacer = str()
if count > 1: count_replacer = repr(count)