summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/virtual_method_hooks.lua4
1 files 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