MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / isinstack

Function isinstack

3rd/lua-5.4.3/src/ldebug.c:649–656  ·  view source on GitHub ↗

** Check whether pointer 'o' points to some value in the stack ** frame of the current function. Because 'o' may not point to a ** value in this stack, we cannot compare it with the region ** boundaries (undefined behaviour in ISO C). */

Source from the content-addressed store, hash-verified

647** boundaries (undefined behaviour in ISO C).
648*/
649static int isinstack (CallInfo *ci, const TValue *o) {
650 StkId pos;
651 for (pos = ci->func + 1; pos < ci->top; pos++) {
652 if (o == s2v(pos))
653 return 1;
654 }
655 return 0; /* not found */
656}
657
658
659/*

Callers 1

varinfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected