diff options
author | bloodstalker <thabogre@gmail.com> | 2018-09-24 14:57:26 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2018-09-24 14:57:26 +0000 |
commit | abafba642f6bcf35526b93f915c559fc39677c74 (patch) | |
tree | 683b8130db44d57c0bfa3c82f12943fcf9c0c67a | |
parent | fix (diff) | |
download | luatablegen-abafba642f6bcf35526b93f915c559fc39677c74.tar.gz luatablegen-abafba642f6bcf35526b93f915c559fc39677c74.zip |
update
-rwxr-xr-x | luatablegen.py | 5 |
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: |