oth.unhook
Removes a hook.
Syntax
oth.unhook(handle: any) -> nil
Parameters
| Parameter | Type | Description |
|---|---|---|
handle | any | The handle value used by the call. |
Returns
| Type | Description |
|---|---|
nil | This function does not return a value. |
Description
oth.unhook is part of the Oth library. Oth works at the raw hook layer. It installs function hooks, exposes their handles and provides trampoline calls.
The previous hook is removed and future calls are routed back to the original implementation.
Example
local handle = oth.hook(print, function() end)
oth.unhook(handle)
Notes
- Raw hooks bypass closure-level safety; always keep the returned handle so you can unhook.