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

Function need_value

libraries/AP_Scripting/lua/src/lcode.c:666–672  ·  view source on GitHub ↗

** check whether list has any jump that do not produce a value ** or produce an inverted value */

Source from the content-addressed store, hash-verified

664** or produce an inverted value
665*/
666static int need_value (FuncState *fs, int list) {
667 for (; list != NO_JUMP; list = getjump(fs, list)) {
668 Instruction i = *getjumpcontrol(fs, list);
669 if (GET_OPCODE(i) != OP_TESTSET) return 1;
670 }
671 return 0; /* not found */
672}
673
674
675/*

Callers 1

exp2regFunction · 0.85

Calls 2

getjumpFunction · 0.85
getjumpcontrolFunction · 0.85

Tested by

no test coverage detected