ReferenceClosures

oth.get_root_callback

Returns the hook function associated with the current oth hook context. Called with a function argument it returns the original of that hooked function, as before.

Syntax

oth.get_root_callback() -> function?

Returns

TypeDescription
function?Root callback, or nil outside the hook.

Description

It is a function value, unlike get_original_thread, which returns a thread. Outside a hook context no callback is available. This does not create or install a hook.

Example

print(oth.get_root_callback())

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