MCPcopy Create free account
hub / github.com/Tencent/sluaunreal / ll_module

Function ll_module

Plugins/slua_unreal/External/lua/loadlib.cpp:671–686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

669
670
671static int ll_module (lua_State *L) {
672 const char *modname = luaL_checkstring(L, 1);
673 int lastarg = lua_gettop(L); /* last parameter */
674 luaL_pushmodule(L, modname, 1); /* get/create module table */
675 /* check whether table already has a _NAME field */
676 if (lua_getfield(L, -1, "_NAME") != LUA_TNIL)
677 lua_pop(L, 1); /* table is an initialized module */
678 else { /* no; initialize it */
679 lua_pop(L, 1);
680 modinit(L, modname);
681 }
682 lua_pushvalue(L, -1);
683 set_env(L);
684 dooptions(L, lastarg);
685 return 1;
686}
687
688
689static 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