From 13328c5bee9b847317313491c3eb9f6f66766de7 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 22 May 2017 23:26:44 +1000 Subject: Add luaD_inctop calls where appropriate --- src/ldo.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ldo.js') diff --git a/src/ldo.js b/src/ldo.js index 83f26cf..fbef68f 100644 --- a/src/ldo.js +++ b/src/ldo.js @@ -89,6 +89,11 @@ const luaD_shrinkstack = function(L) { luaD_reallocstack(L, goodsize); }; +const luaD_inctop = function(L) { + luaD_checkstack(L, 1); + L.top++; +}; + /* ** Prepares a function call: checks the stack, creates a new CallInfo ** entry, fills in the relevant information, calls hook if needed. @@ -653,6 +658,7 @@ module.exports.luaD_callnoyield = luaD_callnoyield; module.exports.luaD_checkstack = luaD_checkstack; module.exports.luaD_growstack = luaD_growstack; module.exports.luaD_hook = luaD_hook; +module.exports.luaD_inctop = luaD_inctop; module.exports.luaD_pcall = luaD_pcall; module.exports.luaD_poscall = luaD_poscall; module.exports.luaD_precall = luaD_precall; -- cgit v1.2.3-54-g00ecf