MCPcopy Create free account
hub / github.com/DFHack/dfhack / isinstack

Function isinstack

depends/lua/src/ldebug.c:547–550  ·  view source on GitHub ↗

** The subtraction of two potentially unrelated pointers is ** not ISO C, but it should not crash a program; the subsequent ** checks are ISO C and ensure a correct result. */

Source from the content-addressed store, hash-verified

545** checks are ISO C and ensure a correct result.
546*/
547static int isinstack (CallInfo *ci, const TValue *o) {
548 ptrdiff_t i = o - ci->u.l.base;
549 return (0 <= i && i < (ci->top - ci->u.l.base) && ci->u.l.base + i == o);
550}
551
552
553/*

Callers 1

varinfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected