diff options
author | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-02-17 14:36:33 +0100 |
---|---|---|
committer | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-02-17 14:53:03 +0100 |
commit | 5131a5ab1f471655d6398748b1eaa9abd47c14da (patch) | |
tree | bf8d1b5102a59898ed520d1afa023301f6483607 /src/lapi.js | |
parent | 78b48979b8dbd367043c39fb21007ab4f54cd0a4 (diff) | |
download | fengari-5131a5ab1f471655d6398748b1eaa9abd47c14da.tar.gz fengari-5131a5ab1f471655d6398748b1eaa9abd47c14da.tar.bz2 fengari-5131a5ab1f471655d6398748b1eaa9abd47c14da.zip |
lua_pcall
Diffstat (limited to 'src/lapi.js')
-rw-r--r-- | src/lapi.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lapi.js b/src/lapi.js index 705fec4..1113eec 100644 --- a/src/lapi.js +++ b/src/lapi.js @@ -276,7 +276,7 @@ const lua_tonumber = function(L, idx) { }; const f_call = function(L, ud) { - ldo.luaD_callnoyield(L, ud.func, ud.nresults); + ldo.luaD_callnoyield(L, ud.funcOff, ud.nresults); }; const lua_type = function(L, idx) { @@ -387,6 +387,10 @@ const lua_pcallk = function(L, nargs, nresults, errfunc, ctx, k) { return status; }; +const lua_pcall = function(L, n, r, f) { + return lua_pcallk(L, n, r, f, 0, null); +} + module.exports.lua_pushvalue = lua_pushvalue; module.exports.lua_pushnil = lua_pushnil; module.exports.lua_pushnumber = lua_pushnumber; @@ -411,6 +415,8 @@ module.exports.lua_tostring = lua_tostring; module.exports.lua_load = lua_load; module.exports.lua_callk = lua_callk; module.exports.lua_call = lua_call; +module.exports.lua_pcallk = lua_pcallk; +module.exports.lua_pcall = lua_pcall; module.exports.lua_pop = lua_pop; module.exports.lua_setglobal = lua_setglobal; module.exports.lua_istable = lua_istable; |