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

Function searcher_Lua

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

Source from the content-addressed store, hash-verified

498
499
500static int searcher_Lua (lua_State *L) {
501 const char *filename;
502 const char *name = luaL_checkstring(L, 1);
503 filename = findfile(L, name, "path", LUA_LSUBSEP);
504 if (filename == NULL) return 1; /* module not found in this path */
505 return checkload(L, (luaL_loadfile(L, filename) == LUA_OK), filename);
506}
507
508
509/*

Callers 1

findloaderFunction · 0.85

Calls 2

findfileFunction · 0.85
checkloadFunction · 0.85

Tested by

no test coverage detected