newcclosure
Wraps a Luau function so that it reports as a C closure. Used to disguise hooks and to bypass upvalue limits in hookfunction.
Signature
newcclosure<A..., R...>(fn: (A...) -> R...): (A...) -> R...Parameters
fn(A...) -> R...The Luau function to wrap.
Returns
function
Example
local wrapped = newcclosure(function(...)
return ...
end)
print(iscclosure(wrapped)) --> true
print(wrapped("kept")) --> kept