diff options
Diffstat (limited to 'Sluift/Lua/Check.cpp')
-rw-r--r-- | Sluift/Lua/Check.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Sluift/Lua/Check.cpp b/Sluift/Lua/Check.cpp index cfb726a..65ada7b 100644 --- a/Sluift/Lua/Check.cpp +++ b/Sluift/Lua/Check.cpp @@ -44,5 +44,5 @@ std::string Lua::checkString(lua_State* L, int arg) { } -void* Lua::checkUserDataRaw(lua_State* L, int arg, const char* tableName) { +void* Lua::checkUserDataRaw(lua_State* L, int arg) { void* userData = lua_touserdata(L, arg); if (!userData) { @@ -52,9 +52,5 @@ void* Lua::checkUserDataRaw(lua_State* L, int arg, const char* tableName) { throw Lua::Exception(getArgTypeError(L, arg, LUA_TUSERDATA)); } - lua_getfield(L, LUA_REGISTRYINDEX, tableName); - if (!lua_rawequal(L, -1, -2)) { - throw Lua::Exception(getArgTypeError(L, arg, LUA_TUSERDATA)); - } - lua_pop(L, 2); + lua_pop(L, 1); return userData; } |