| 145 | } lpb_State; |
| 146 | |
| 147 | static int lpb_reftable(lua_State *L, int ref) { |
| 148 | if (ref != LUA_NOREF) { |
| 149 | lua_rawgeti(L, LUA_REGISTRYINDEX, ref); |
| 150 | return ref; |
| 151 | } else { |
| 152 | lua_newtable(L); |
| 153 | lua_pushvalue(L, -1); |
| 154 | return luaL_ref(L, LUA_REGISTRYINDEX); |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | static void lpb_pushdeftable(lua_State *L, lpb_State *LS) |
| 159 | { LS->defs_index = lpb_reftable(L, LS->defs_index); } |
no test coverage detected