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

Function incomplete

libraries/AP_Scripting/lua/src/lua.c:292–302  ·  view source on GitHub ↗

** Check whether 'status' signals a syntax error and the error ** message at the top of the stack ends with the above mark for ** incomplete statements. */

Source from the content-addressed store, hash-verified

290** incomplete statements.
291*/
292static int incomplete (lua_State *L, int status) {
293 if (status == LUA_ERRSYNTAX) {
294 size_t lmsg;
295 const char *msg = lua_tolstring(L, -1, &lmsg);
296 if (lmsg >= marklen && strcmp(msg + lmsg - marklen, EOFMARK) == 0) {
297 lua_pop(L, 1);
298 return 1;
299 }
300 }
301 return 0; /* else... */
302}
303
304
305/*

Callers 1

multilineFunction · 0.85

Calls 2

lua_tolstringFunction · 0.85
strcmpFunction · 0.85

Tested by

no test coverage detected