| 243 | |
| 244 | |
| 245 | static void gethooktable (lua_State *L) { |
| 246 | lua_pushlightuserdata(L, (void *)&KEY_HOOK); |
| 247 | lua_rawget(L, LUA_REGISTRYINDEX); |
| 248 | if (!lua_istable(L, -1)) { |
| 249 | lua_pop(L, 1); |
| 250 | lua_createtable(L, 0, 1); |
| 251 | lua_pushlightuserdata(L, (void *)&KEY_HOOK); |
| 252 | lua_pushvalue(L, -2); |
| 253 | lua_rawset(L, LUA_REGISTRYINDEX); |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | |
| 258 | static int db_sethook (lua_State *L) { |
no test coverage detected