Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- newcclosure = missing("function", newcclosure, function(f) return f end)
- iscclosure = missing("function", iscclosure, function(f) return debug.getinfo(f, "S").what == "C" end)
- newlclosure = missing("function", newlclosure, function(f) return f end)
- islclosure = missing("function", islclosure, function(f) return debug.getinfo(f, "S").what == "Lua" end)
- wrapclosure = missing("function", wrapclosure, function(f)
- if islclosure(f) then
- return newcclosure(f)
- elseif iscclosure(f) then
- return newlclosure(f)
- end
- return f
- end)
Advertisement
Add Comment
Please, Sign In to add comment