diff options
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 |