h2
This commit is contained in:
1 parent
ca49a90412
commit
3fec850a75
1 file changed
+1
-1
+1
-1
@@ -118,7 +118,7 @@ LUALIB_API int luaL_newmetatable (lua_State *L, const char *tname) {
|
||||
|
||||
LUALIB_API void *luaL_checkudata (lua_State *L, int ud, const char *tname) {
|
||||
void *p = lua_touserdata(L, ud);
|
||||
if (p != NULL) { /* value is a userdata? */
|
||||
if (l_likely(p != NULL)) { /* value is a userdata? */
|
||||
if (lua_getmetatable(L, ud)) { /* does it have a metatable? */
|
||||
lua_getfield(L, LUA_REGISTRYINDEX, tname); /* get correct metatable */
|
||||
if (lua_rawequal(L, -1, -2)) { /* does it have the correct mt? */
|
||||
|
||||
Reference in new issue
Block a user