MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / ll_module

Function ll_module

libraries/AP_Scripting/lua/src/loadlib.c:701–716  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

699
700
701static int ll_module (lua_State *L) {
702 const char *modname = luaL_checkstring(L, 1);
703 int lastarg = lua_gettop(L); /* last parameter */
704 luaL_pushmodule(L, modname, 1); /* get/create module table */
705 /* check whether table already has a _NAME field */
706 if (lua_getfield(L, -1, "_NAME") != LUA_TNIL)
707 lua_pop(L, 1); /* table is an initialized module */
708 else { /* no; initialize it */
709 lua_pop(L, 1);
710 modinit(L, modname);
711 }
712 lua_pushvalue(L, -1);
713 set_env(L);
714 dooptions(L, lastarg);
715 return 1;
716}
717
718
719static 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