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

Function handle_script

libraries/AP_Scripting/lua/src/lua.c:438–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436
437
438static int handle_script (lua_State *L, char **argv) {
439 int status;
440 const char *fname = argv[0];
441 if (strcmp(fname, "-") == 0 && strcmp(argv[-1], "--") != 0)
442 fname = NULL; /* stdin */
443 status = luaL_loadfile(L, fname);
444 if (status == LUA_OK) {
445 int n = pushargs(L); /* push arguments to script */
446 status = docall(L, n, LUA_MULTRET);
447 }
448 return report(L, status);
449}
450
451
452

Callers 1

pmainFunction · 0.85

Calls 4

strcmpFunction · 0.85
pushargsFunction · 0.85
docallFunction · 0.85
reportFunction · 0.85

Tested by

no test coverage detected