diff options
Diffstat (limited to 'Runtime/Lua/LuaBind')
-rw-r--r-- | Runtime/Lua/LuaBind/LuaBindState.cpp | 6 | ||||
-rw-r--r-- | Runtime/Lua/LuaBind/LuaBindState.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Runtime/Lua/LuaBind/LuaBindState.cpp b/Runtime/Lua/LuaBind/LuaBindState.cpp index c9183ff..7c5f043 100644 --- a/Runtime/Lua/LuaBind/LuaBindState.cpp +++ b/Runtime/Lua/LuaBind/LuaBindState.cpp @@ -284,6 +284,12 @@ namespace LuaBind return ((t == LUA_TNONE) || (t == LUA_TNIL)); } + bool State::IsTable(int idx) + { + int check = lua_type(mState, idx); + return check == LUA_TTABLE; + } + bool State::IsTableOrUserdata(int idx) { int check = lua_type(mState, idx); diff --git a/Runtime/Lua/LuaBind/LuaBindState.h b/Runtime/Lua/LuaBind/LuaBindState.h index c81ba8c..e7e2807 100644 --- a/Runtime/Lua/LuaBind/LuaBindState.h +++ b/Runtime/Lua/LuaBind/LuaBindState.h @@ -85,6 +85,7 @@ namespace LuaBind bool IsNil(int idx); bool IsNilOrNone(int idx); + bool IsTable(int idx); bool IsTableOrUserdata(int idx); bool IsTrueOrNotNil(int idx); bool IsType(int idx, int type); |