From e0d4ffcc75a04b3ecc2cc08aea372d9621e5b6ac Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Mon, 20 Feb 2017 11:26:28 +0100 Subject: rawequal --- src/lapi.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/lapi.js') 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 -- cgit v1.2.3-54-g00ecf