Skip to content

Commit dc015ca

Browse files
committed
add luaw::checkstack
1 parent bef937c commit dc015ca

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/peacalm/luaw.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,9 @@ class luaw {
624624
void settop(int idx) { lua_settop(L_, idx); }
625625
void cleartop() { settop(0); }
626626

627+
/// Whether enough for at least n extra elements.
628+
bool checkstack(int n) { return lua_checkstack(L_, n); }
629+
627630
// clang-format off
628631
int loadstring(const char* s) { return luaL_loadstring(L_, s); }
629632
int loadstring(const std::string& s) { return loadstring(s.c_str()); }

0 commit comments

Comments
 (0)