| 2669 | } |
| 2670 | |
| 2671 | COMPAT53_API void *luaL_testudata(lua_State *L, int i, const char *tname) { |
| 2672 | void *p = lua_touserdata(L, i); |
| 2673 | luaL_checkstack(L, 2, "not enough stack slots"); |
| 2674 | if (p == NULL || !lua_getmetatable(L, i)) |
| 2675 | return NULL; |
| 2676 | else { |
| 2677 | int res = 0; |
| 2678 | luaL_getmetatable(L, tname); |
| 2679 | res = lua_rawequal(L, -1, -2); |
| 2680 | lua_pop(L, 2); |
| 2681 | if (!res) |
| 2682 | p = NULL; |
| 2683 | } |
| 2684 | return p; |
| 2685 | } |
| 2686 | |
| 2687 | static int compat53_countlevels(lua_State *L) { |
| 2688 | lua_Debug ar; |
nothing calls this directly
no test coverage detected