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

Method add_module_function

src/lua/lua_environment.cpp:410–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

408}
409
410void LuaEnvironment::add_module_function(const char *module, const char *name, const lua_CFunction func)
411{
412 luaL_Reg entry[2];
413 entry[0].name = name;
414 entry[0].func = func;
415 entry[1].name = NULL;
416 entry[1].func = NULL;
417
418 luaL_register(L, module, entry);
419 lua_pop(L, 1);
420}
421
422void LuaEnvironment::add_module_function(const char *module, const char *name, const char *func)
423{

Callers 1

load_apiFunction · 0.80

Calls 2

luaL_registerFunction · 0.50
lua_setfieldFunction · 0.50

Tested by

no test coverage detected