Skip to main content

AzCallbackInvoker

Type Alias AzCallbackInvoker 

Source
pub type AzCallbackInvoker = extern "C" fn(handle: u64, data: *const RefAny, info: *const CallbackInfo, out: *mut Update);
Expand description

Pointer-arg variant of this callback kind’s typedef.

The host’s libffi closure casts to this signature (which all managed-FFI runtimes can handle — args and return are passed by pointer, no aggregate-by-value anywhere). The static thunk in libazul does the by-value plumbing on the C ABI side.

LuaJIT FFI in particular cannot return aggregates larger than 8 bytes from a callback, so we use an out-pointer for the return value uniformly across kinds — even for Update which would fit in a register, so the macro stays homogeneous.