MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / ll_module

Function ll_module

src/Chain/libraries/glua/loadlib.cpp:715–730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

713
714
715static int ll_module(lua_State *L) {
716 const char *modname = luaL_checkstring(L, 1);
717 int lastarg = lua_gettop(L); /* last parameter */
718 luaL_pushmodule(L, modname, 1); /* get/create module table */
719 /* check whether table already has a _NAME field */
720 if (lua_getfield(L, -1, "_NAME") != LUA_TNIL)
721 lua_pop(L, 1); /* table is an initialized module */
722 else { /* no; initialize it */
723 lua_pop(L, 1);
724 modinit(L, modname);
725 }
726 lua_pushvalue(L, -1);
727 set_env(L);
728 dooptions(L, lastarg);
729 return 1;
730}
731
732
733static 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