summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-13 19:19:13 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-13 19:19:13 +0200
commit2eaa22840d03998a0ced0dc6c5a7a71630c4dc29 (patch)
treeeb20f3a4035ce46f45307f0a2b6c0e920c6a5fb0 /source
parentI think the chunk generation hooks for Lua are pretty good now, though it might still need some tweaking (diff)
downloadcuberite-2eaa22840d03998a0ced0dc6c5a7a71630c4dc29.tar
cuberite-2eaa22840d03998a0ced0dc6c5a7a71630c4dc29.tar.gz
cuberite-2eaa22840d03998a0ced0dc6c5a7a71630c4dc29.tar.bz2
cuberite-2eaa22840d03998a0ced0dc6c5a7a71630c4dc29.tar.lz
cuberite-2eaa22840d03998a0ced0dc6c5a7a71630c4dc29.tar.xz
cuberite-2eaa22840d03998a0ced0dc6c5a7a71630c4dc29.tar.zst
cuberite-2eaa22840d03998a0ced0dc6c5a7a71630c4dc29.zip
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