ReferenceClosures

isnewcclosure

Checks whether a C function is a wrapper made by newcclosure.

Syntax

isnewcclosure(func: function) -> boolean

Also available as

iscustomcclosure

Parameters

ParameterTypeDescription
funcfunctionThe function to check.

Returns

TypeDescription
booleantrue when the function is a wrapper created by newcclosure.

Description

Ordinary built-in C functions return false. Only wrappers Apex created return true.

Example

print(isnewcclosure(print))
print(isnewcclosure(newcclosure(function() end)))

These are Game executor contracts. Check build requirements and session lifetimes before using them.