Use `table.pack` in bridge.lua metawrapper newindex metamethod

This commit is contained in:
Gnome Ann 2021-12-22 12:06:22 -05:00
parent bc26b7c7af
commit 175416c1ba
1 changed files with 2 additions and 2 deletions

View File

@ -120,12 +120,12 @@ return function(_python, _bridged)
_needs_unwrap = true
wrapped = true
end
local r = {wrapped_func(...)}
local r = table.pack(wrapped_func(...))
if _needs_unwrap then
metatables:restore()
wrapped = false
end
return table.unpack(r)
return table.unpack(r, 1, r.n)
end)
else
return rawset(t, k, wrapped_func)