MCPcopy Create free account
hub / github.com/ThePhD/sol2 / check_stack

Method check_stack

include/sol/stack_guard.hpp:53–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 stack_guard(lua_State* L, int top, std::function<void(int, int)> fx = detail::stack_fail) : L(L), top(top), on_mismatch(std::move(fx)) {
52 }
53 bool check_stack(int modification = 0) const {
54 int bottom = lua_gettop(L) + modification;
55 if (top == bottom) {
56 return true;
57 }
58 on_mismatch(top, bottom);
59 return false;
60 }
61 ~stack_guard() {
62 check_stack();
63 }

Callers 1

functions.cppFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected