diff options
author | bloodstalker <thabogre@gmail.com> | 2019-01-08 06:33:04 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2019-01-08 06:33:04 +0000 |
commit | 2a74ef938444e865b0d18f368d29f1303631e9c2 (patch) | |
tree | f43f9ff8c2e534a3d69a289e33a15e1d00db8bcc | |
parent | update (diff) | |
download | luatablegen-2a74ef938444e865b0d18f368d29f1303631e9c2.tar.gz luatablegen-2a74ef938444e865b0d18f368d29f1303631e9c2.zip |
test
Diffstat (limited to '')
-rwxr-xr-x | luatablegen.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/luatablegen.py b/luatablegen.py index c160347..46332b6 100755 --- a/luatablegen.py +++ b/luatablegen.py @@ -754,11 +754,10 @@ class TbgParser(object): dummy += "for (uint64_t i = 0; i < dummy->" + count_replacer + " ; ++i) {\nlua_pushinteger(__ls, i+1);\n" if ref_node_type != None: 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 continue;\n}" - #dummy += "new_" + ref_node_type.attrib["name"] + "(__ls);\n" dummy += "lua_pushlightuserdata(__ls, dummy->"+field_name+"[i]);\n" - dummy += 'luaL_getmetatable(__ls,"'+ref_node_type.attrib["name"]+'");\n' - dummy += "lua_setmetatable(__ls, -2);\n" + dummy += "lua_gettable(__ls, LUA_REGISTRYINDEX);\n" + #dummy += 'luaL_getmetatable(__ls,"'+ref_node_type.attrib["name"]+'");\n' + #dummy += "lua_setmetatable(__ls, -2);\n" dummy += "} else {\nlua_pop(__ls, 1);\n continue;\n}" else: eq_lua_type = get_eq_lua_type(field_type) |