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

Function ll_searchpath

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

Source from the content-addressed store, hash-verified

461
462
463static int ll_searchpath (lua_State *L) {
464 const char *f = searchpath(L, luaL_checkstring(L, 1),
465 luaL_checkstring(L, 2),
466 luaL_optstring(L, 3, "."),
467 luaL_optstring(L, 4, LUA_DIRSEP));
468 if (f != NULL) return 1;
469 else { /* error message is on top of the stack */
470 lua_pushnil(L);
471 lua_insert(L, -2);
472 return 2; /* return nil + error message */
473 }
474}
475
476
477static const char *findfile (lua_State *L, const char *name,

Callers

nothing calls this directly

Calls 2

searchpathFunction · 0.85
lua_pushnilFunction · 0.85

Tested by

no test coverage detected