The function luaL_checkudata(L, index, name) exits with an error whenthe name does not correspond to the one in the metatable consulted.However, I have a situation where this situation is not necessarilyfatal for the program.
Lua 5.2 will also have luaL_testudata, which does not abort.