From 2a74ef938444e865b0d18f368d29f1303631e9c2 Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Tue, 8 Jan 2019 10:03:04 +0330 Subject: test --- luatablegen.py | 7 +++---- 1 file 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) -- cgit v1.2.3