From ea8b3d63af92085d1563c670968152c7dbbb7642 Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Tue, 11 Apr 2017 12:25:30 +0200 Subject: debug.getlocal --- src/lapi.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/lapi.js') diff --git a/src/lapi.js b/src/lapi.js index 3fbcee9..00db461 100644 --- a/src/lapi.js +++ b/src/lapi.js @@ -736,6 +736,14 @@ const lua_isuserdata = function(L, idx) { return o.ttisfulluserdata(o) || o.ttislightuserdata(); }; +const lua_isthread = function(L, idx) { + return lua_type(L, idx) === CT.LUA_TTHREAD; +}; + +const lua_isfunction = function(L, idx) { + return lua_type(L, idx) === CT.LUA_TFUNCTION; +}; + const lua_rawequal = function(L, index1, index2) { let o1 = index2addr(L, index1); let o2 = index2addr(L, index2); @@ -927,6 +935,7 @@ module.exports.lua_getmetatable = lua_getmetatable; module.exports.lua_gettable = lua_gettable; module.exports.lua_gettop = lua_gettop; module.exports.lua_insert = lua_insert; +module.exports.lua_isfunction = lua_isfunction; module.exports.lua_isinteger = lua_isinteger; module.exports.lua_isnil = lua_isnil; module.exports.lua_isnone = lua_isnone; @@ -934,6 +943,7 @@ module.exports.lua_isnoneornil = lua_isnoneornil; module.exports.lua_isnumber = lua_isnumber; module.exports.lua_isstring = lua_isstring; module.exports.lua_istable = lua_istable; +module.exports.lua_isthread = lua_isthread; module.exports.lua_isuserdata = lua_isuserdata; module.exports.lua_len = lua_len; module.exports.lua_load = lua_load; -- cgit v1.2.3-54-g00ecf