This commit is contained in:
Manuel Simon Hirsig
2016-09-12 15:02:45 +02:00
parent 2058c0fd81
commit 758884bef5
2 changed files with 3 additions and 4 deletions
+2 -2
View File
@@ -67,11 +67,11 @@ public.auto = setmetatable({}, {
})
public.temp = setmetatable({}, {
__metatable = false,
__sub = function(_, v) set_auto_release(v, false); return v end,
__sub = function(_, v) set_auto_release(v, true); return v end,
})
public.perm = setmetatable({}, {
__metatable = false,
__sub = function(_, v) set_auto_release(v, true); return v end,
__sub = function(_, v) set_auto_release(v, false); return v end,
})
public.init = setmetatable({}, {
+1 -2
View File
@@ -92,8 +92,7 @@ do
end
function public.vararg.partial(arg)
local f = tremove(arg, 1)
local arg1 = copy(arg)
local f, arg1 = tremove(arg, 1), perm-arg
return vararg(function(arg)
for i = 1, getn(arg) do
tinsert(arg1, arg[i])