| 165 | { LS->dec_hooks_index = lpb_reftable(L, LS->dec_hooks_index); } |
| 166 | |
| 167 | static int Lpb_delete(lua_State *L) { |
| 168 | lpb_State *LS = (lpb_State*)luaL_testudata(L, 1, PB_STATE); |
| 169 | if (LS != NULL) { |
| 170 | const pb_State *GS = global_state; |
| 171 | pb_free(&LS->local); |
| 172 | if (&LS->local == GS) |
| 173 | global_state = NULL; |
| 174 | LS->state = NULL; |
| 175 | pb_resetbuffer(&LS->buffer); |
| 176 | luaL_unref(L, LUA_REGISTRYINDEX, LS->defs_index); |
| 177 | luaL_unref(L, LUA_REGISTRYINDEX, LS->enc_hooks_index); |
| 178 | luaL_unref(L, LUA_REGISTRYINDEX, LS->dec_hooks_index); |
| 179 | } |
| 180 | return 0; |
| 181 | } |
| 182 | |
| 183 | LUALIB_API lpb_State *lpb_lstate(lua_State *L) { |
| 184 | lpb_State *LS; |
nothing calls this directly
no test coverage detected