Skip to content

Commit 9d370b7

Browse files
authoredOct 21, 2020
Add documentation to builtin core.run_callbacks (#10494)
1 parent 5c0a57f commit 9d370b7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎builtin/client/register.lua

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ core.callback_origins = {}
44
local getinfo = debug.getinfo
55
debug.getinfo = nil
66

7+
--- Runs given callbacks.
8+
--
9+
-- Note: this function is also called from C++
10+
-- @tparam table callbacks a table with registered callbacks, like `core.registered_on_*`
11+
-- @tparam number mode a RunCallbacksMode, as defined in src/script/common/c_internal.h
12+
-- @param ... arguments for the callback
13+
-- @return depends on mode
714
function core.run_callbacks(callbacks, mode, ...)
815
assert(type(callbacks) == "table")
916
local cb_len = #callbacks

0 commit comments

Comments
 (0)
Please sign in to comment.