MCPcopy Create free account
hub / github.com/BigPig0/RelayLive / ll_module

Function ll_module

ThirdParty/lua/lua/loadlib.c:633–648  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

631
632
633static int ll_module (lua_State *L) {
634 const char *modname = luaL_checkstring(L, 1);
635 int lastarg = lua_gettop(L); /* last parameter */
636 luaL_pushmodule(L, modname, 1); /* get/create module table */
637 /* check whether table already has a _NAME field */
638 if (lua_getfield(L, -1, "_NAME") != LUA_TNIL)
639 lua_pop(L, 1); /* table is an initialized module */
640 else { /* no; initialize it */
641 lua_pop(L, 1);
642 modinit(L, modname);
643 }
644 lua_pushvalue(L, -1);
645 set_env(L);
646 dooptions(L, lastarg);
647 return 1;
648}
649
650
651static int ll_seeall (lua_State *L) {

Callers

nothing calls this directly

Calls 7

lua_gettopFunction · 0.85
luaL_pushmoduleFunction · 0.85
lua_getfieldFunction · 0.85
modinitFunction · 0.85
lua_pushvalueFunction · 0.85
set_envFunction · 0.85
dooptionsFunction · 0.85

Tested by

no test coverage detected