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

Method set_module_number

src/lua/lua_environment.cpp:465–478  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

463}
464
465void LuaEnvironment::set_module_number(const char *module, const char *name, f64 value)
466{
467 // Create module if it does not exist
468 luaL_Reg entry;
469 entry.name = NULL;
470 entry.func = NULL;
471 luaL_register(L, module, &entry);
472 lua_pop(L, 1);
473
474 lua_getglobal(L, module);
475 lua_pushnumber(L, value);
476 lua_setfield(L, -2, name);
477 lua_pop(L, 1);
478}
479
480int LuaEnvironment::call(int narg, int nres)
481{

Callers 1

load_apiFunction · 0.80

Calls 3

luaL_registerFunction · 0.50
lua_pushnumberFunction · 0.50
lua_setfieldFunction · 0.50

Tested by

no test coverage detected