Skip to content

Commit

Permalink
Add documentation to builtin core.run_callbacks (#10494)
Browse files Browse the repository at this point in the history
  • Loading branch information
Desour committed Oct 21, 2020
1 parent 5c0a57f commit 9d370b7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions builtin/client/register.lua
Expand Up @@ -4,6 +4,13 @@ core.callback_origins = {}
local getinfo = debug.getinfo
debug.getinfo = nil

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

0 comments on commit 9d370b7

Please sign in to comment.