MCPcopy Create free account
hub / github.com/crownengine/crown / call

Method call

src/lua/lua_environment.cpp:480–489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

478}
479
480int LuaEnvironment::call(int narg, int nres)
481{
482 int status;
483 int base = lua_gettop(L) - narg; /* function index */
484 lua_pushcfunction(L, msghandler); /* push message handler */
485 lua_insert(L, base); /* put it under function and args */
486 status = lua_pcall(L, narg, nres, base);
487 lua_remove(L, base); /* remove message handler from the stack */
488 return status;
489}
490
491void LuaEnvironment::call_global(const char *func, ArgType::Enum *arg_types, Arg *args, int narg, int nres)
492{

Callers 12

do_fileMethod · 0.95
requireMethod · 0.95
executeMethod · 0.95
execute_stringMethod · 0.95
broadcastFunction · 0.45
multicastFunction · 0.45
unicastFunction · 0.45
do_REPLFunction · 0.45
rFunction · 0.45
badge_only.jsFile · 0.45
tFunction · 0.45
theme.jsFile · 0.45

Calls 4

lua_gettopFunction · 0.50
lua_insertFunction · 0.50
lua_pcallFunction · 0.50
lua_removeFunction · 0.50

Tested by

no test coverage detected