Modified ToLua additional script to allow multi-usertype virtual functions
git-svn-id: http://mc-server.googlecode.com/svn/trunk@601 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
ee9e024bed
commit
2eaa22840d
@ -413,8 +413,8 @@ function classVirtualClass:output_method(f, btype)
|
||||
if m == "*" then m = "" end
|
||||
output("\t\t\ttolua_pushusertype(lua_state, (void*)"..m..arg.name..", \""..arg.type.."\");")
|
||||
else
|
||||
output("\t\t\tvoid* tolua_obj = (void*)new "..arg.type.."("..arg.name..");\n")
|
||||
output('\t\t\ttolua_pushusertype_and_takeownership(lua_state, tolua_obj, "'..arg.type..'");\n')
|
||||
output("\t\t\tvoid* tolua_obj" .. argn .." = (void*)new "..arg.type.."("..arg.name..");\n")
|
||||
output('\t\t\ttolua_pushusertype_and_takeownership(lua_state, tolua_obj' .. argn .. ', "'..arg.type..'");\n')
|
||||
end
|
||||
end
|
||||
argn = argn+1
|
||||
|
Loading…
Reference in New Issue
Block a user