diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-13 19:19:13 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-13 19:19:13 +0200 |
commit | 2eaa22840d03998a0ced0dc6c5a7a71630c4dc29 (patch) | |
tree | eb20f3a4035ce46f45307f0a2b6c0e920c6a5fb0 | |
parent | I think the chunk generation hooks for Lua are pretty good now, though it might still need some tweaking (diff) | |
download | cuberite-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 |
-rw-r--r-- | source/virtual_method_hooks.lua | 4 |
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
|