From 2eaa22840d03998a0ced0dc6c5a7a71630c4dc29 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Wed, 13 Jun 2012 17:19:13 +0000 Subject: 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 --- source/virtual_method_hooks.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/virtual_method_hooks.lua b/source/virtual_method_hooks.lua index 71b0e4cf8..407b61627 100644 --- a/source/virtual_method_hooks.lua +++ b/source/virtual_method_hooks.lua @@ -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 -- cgit v1.2.3