MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / isinstack

Function isinstack

extlibs/lua/src/ldebug.c:656–660  ·  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

654** checks are ISO C and ensure a correct result.
655*/
656static int isinstack (CallInfo *ci, const TValue *o) {
657 StkId base = ci->func + 1;
658 ptrdiff_t i = cast(StkId, o) - base;
659 return (0 <= i && i < (ci->top - base) && s2v(base + i) == o);
660}
661
662
663/*

Callers 1

varinfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected