newcclosure
Many executors are implementing this function using coroutine
functions in Lua; these implementations won't pass sUNC checks.
The wrapped function should be yieldable (meaning that the function should be able to call task.wait
, for example)
This function takes in a function and wraps it into a C closure.
When the returned function is called, the original Lua closure is called, and arguments are passed to the original closure, and then the original closure returned arguments are passed to the caller of the C closure.
Parameter
function_to_wrap
- A function to be wrapped.
Example
Last updated