diff options
author | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-02-22 07:42:36 +0100 |
---|---|---|
committer | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-02-22 07:48:59 +0100 |
commit | c1824a99035a231172f3c10ae3ee24a3e6330260 (patch) | |
tree | 46136d16c9a7a7f34b3ef2818fff1d32e565b3c3 /src/lapi.js | |
parent | 653f4a07af6506e0b8ef71e8957976b9559f67e4 (diff) | |
download | fengari-c1824a99035a231172f3c10ae3ee24a3e6330260.tar.gz fengari-c1824a99035a231172f3c10ae3ee24a3e6330260.tar.bz2 fengari-c1824a99035a231172f3c10ae3ee24a3e6330260.zip |
xpcall calls msgh
Diffstat (limited to 'src/lapi.js')
-rw-r--r-- | src/lapi.js | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/lapi.js b/src/lapi.js index 9059ee9..c091150 100644 --- a/src/lapi.js +++ b/src/lapi.js @@ -548,9 +548,9 @@ const lua_pcallk = function(L, nargs, nresults, errfunc, ctx, k) { if (errfunc === 0) func = 0; else { - let o = index2addr(L, errfunc); + // let o = index2addr(L, errfunc); // TODO: api_checkstackindex(L, errfunc, o); - func = errfunc; + func = index2addr_(L, errfunc); } c.funcOff = L.top - (nargs + 1); /* function to be called */ @@ -605,6 +605,17 @@ const lua_concat = function(L, n) { } }; +// This functions are only there for compatibility purposes +const lua_gc = function () {}; + +const lua_getallocf = function () { + console.warn("lua_getallocf is not available and will always return null"); + return null; +}; +const lua_getextraspace = function () { + console.warn("lua_getextraspace is not available and will always return null"); + return null; +}; module.exports.lua_pushvalue = lua_pushvalue; module.exports.lua_pushnil = lua_pushnil; @@ -659,4 +670,7 @@ module.exports.lua_settop = lua_settop; module.exports.lua_rawequal = lua_rawequal; module.exports.lua_concat = lua_concat; module.exports.lua_error = lua_error; -module.exports.lua_insert = lua_insert;
\ No newline at end of file +module.exports.lua_insert = lua_insert; +module.exports.lua_gc = lua_gc; +module.exports.lua_getallocf = lua_getallocf; +module.exports.lua_getextraspace = lua_getextraspace;
\ No newline at end of file |