MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / ll_module

Function ll_module

third-party/lua-5.2.4/src/loadlib.c:585–601  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

583
584
585static int ll_module (lua_State *L) {
586 const char *modname = luaL_checkstring(L, 1);
587 int lastarg = lua_gettop(L); /* last parameter */
588 luaL_pushmodule(L, modname, 1); /* get/create module table */
589 /* check whether table already has a _NAME field */
590 lua_getfield(L, -1, "_NAME");
591 if (!lua_isnil(L, -1)) /* is table an initialized module? */
592 lua_pop(L, 1);
593 else { /* no; initialize it */
594 lua_pop(L, 1);
595 modinit(L, modname);
596 }
597 lua_pushvalue(L, -1);
598 set_env(L);
599 dooptions(L, lastarg);
600 return 1;
601}
602
603
604static int ll_seeall (lua_State *L) {

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected