mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-01-20 20:38:21 +01:00
Use table.pack
in bridge.lua metawrapper newindex metamethod
This commit is contained in:
parent
bc26b7c7af
commit
175416c1ba
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user