Skip to content
Permalink
Browse files

Add documentation to builtin core.run_callbacks (#10494)

  • Loading branch information
Desour committed Oct 21, 2020
1 parent 5c0a57f commit 9d370b78da61997f46f228cb3e4b54b8ee9295ff
Showing with 7 additions and 0 deletions.
  1. +7 −0 builtin/client/register.lua
@@ -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

0 comments on commit 9d370b7

Please sign in to comment.
You can’t perform that action at this time.