| 1052 | |
| 1053 | |
| 1054 | static int tref (lua_State *L) { |
| 1055 | int level = lua_gettop(L); |
| 1056 | luaL_checkany(L, 1); |
| 1057 | lua_pushvalue(L, 1); |
| 1058 | lua_pushinteger(L, luaL_ref(L, LUA_REGISTRYINDEX)); |
| 1059 | cast_void(level); /* to avoid warnings */ |
| 1060 | lua_assert(lua_gettop(L) == level+1); /* +1 for result */ |
| 1061 | return 1; |
| 1062 | } |
| 1063 | |
| 1064 | static int getref (lua_State *L) { |
| 1065 | int level = lua_gettop(L); |
nothing calls this directly
no test coverage detected