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

Function luaopen_base

libraries/AP_Scripting/lua/src/lbaselib.c:489–500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

487
488
489LUAMOD_API int luaopen_base (lua_State *L) {
490 /* open lib into global table */
491 lua_pushglobaltable(L);
492 luaL_setfuncs(L, base_funcs, 0);
493 /* set global _G */
494 lua_pushvalue(L, -1);
495 lua_setfield(L, -2, "_G");
496 /* set global _VERSION */
497 lua_pushliteral(L, LUA_VERSION);
498 lua_setfield(L, -2, "_VERSION");
499 return 1;
500}
501
502LUAMOD_API int luaopen_base_sandbox(lua_State *L) {
503 luaL_setfuncs(L, base_funcs, 0);

Callers

nothing calls this directly

Calls 3

luaL_setfuncsFunction · 0.85
lua_pushvalueFunction · 0.85
lua_setfieldFunction · 0.85

Tested by

no test coverage detected