diff options
author | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-02-20 11:26:28 +0100 |
---|---|---|
committer | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-02-20 11:29:35 +0100 |
commit | e0d4ffcc75a04b3ecc2cc08aea372d9621e5b6ac (patch) | |
tree | b7681375fe8f42139d9eab5554704d3899a6a050 /src/lapi.js | |
parent | b62bcdfa67d6b0359bf45930ab392953d69eb399 (diff) | |
download | fengari-e0d4ffcc75a04b3ecc2cc08aea372d9621e5b6ac.tar.gz fengari-e0d4ffcc75a04b3ecc2cc08aea372d9621e5b6ac.tar.bz2 fengari-e0d4ffcc75a04b3ecc2cc08aea372d9621e5b6ac.zip |
rawequal
Diffstat (limited to 'src/lapi.js')
-rw-r--r-- | src/lapi.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lapi.js b/src/lapi.js index e1e548d..95eb6f7 100644 --- a/src/lapi.js +++ b/src/lapi.js @@ -443,7 +443,13 @@ const lua_istable = function(L, idx) { const lua_isstring = function(L, idx) { let o = index2addr(L, idx); return o.ttisstring() || o.ttisnumber(); -} +}; + +const lua_rawequal = function(L, index1, index2) { + let o1 = index2addr(L, index1); + let o2 = index2addr(L, index2); + return lvm.luaV_equalobj(null, o1, o2); // TODO: isvalid ? +}; /* ** 'load' and 'call' functions (run Lua code) @@ -591,4 +597,5 @@ module.exports.lua_getfield = lua_getfield; module.exports.lua_getglobal = lua_getglobal; module.exports.lua_getmetatable = lua_getmetatable; module.exports.lua_setmetatable = lua_setmetatable; -module.exports.lua_settop = lua_settop;
\ No newline at end of file +module.exports.lua_settop = lua_settop; +module.exports.lua_rawequal = lua_rawequal;
\ No newline at end of file |