aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-09-24 14:57:26 +0000
committerbloodstalker <thabogre@gmail.com>2018-09-24 14:57:26 +0000
commitabafba642f6bcf35526b93f915c559fc39677c74 (patch)
tree683b8130db44d57c0bfa3c82f12943fcf9c0c67a
parentfix (diff)
downloadluatablegen-abafba642f6bcf35526b93f915c559fc39677c74.tar.gz
luatablegen-abafba642f6bcf35526b93f915c559fc39677c74.zip
update
-rwxr-xr-xluatablegen.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/luatablegen.py b/luatablegen.py
index 83d1ea5..f39db21 100755
--- a/luatablegen.py
+++ b/luatablegen.py
@@ -559,7 +559,10 @@ class TbgParser(object):
count = get_elem_count(childer)
if count == 1:
ref_type_node = get_def_node_tag(childer.attrib["type"][6:], self.elems)
- c_source.write("push_" + ref_type_node.attrib["name"] + "(__ls, _st->" + child.attrib["name"] + ");\n")
+ if ref_type_node != None:
+ c_source.write("push_" + ref_type_node.attrib["name"] + "(__ls, _st->" + child.attrib["name"] + ");\n")
+ else:
+ c_source.write("push_lightuserdata(__ls, _st->" + child.attrib["name"] + ");\n")
# FIXME
else: pass
else: