iscclosure Synchronous
Tell whether a function is a native C closure. This is useful before using debug operations that only work on Luau closures.
Luau
iscclosure(value: Function) -> booleanParameters
| Parameter | Type | Description |
|---|---|---|
value | Function | The function to inspect. Passing a non-function raises an error. |
Returns
booleantrue for a C closure; false for a Luau closure.
Example
Luau
local native = newcclosure(function() end)
print(iscclosure(native)) -- true
print(iscclosure(function() end)) -- false