| 249 | |
| 250 | |
| 251 | static void gethooktable (lua_State *L) { |
| 252 | lua_pushlightuserdata(L, (void *)&KEY_HOOK); |
| 253 | lua_rawget(L, LUA_REGISTRYINDEX); |
| 254 | if (!lua_istable(L, -1)) { |
| 255 | lua_pop(L, 1); |
| 256 | lua_createtable(L, 0, 1); |
| 257 | lua_pushlightuserdata(L, (void *)&KEY_HOOK); |
| 258 | lua_pushvalue(L, -2); |
| 259 | lua_rawset(L, LUA_REGISTRYINDEX); |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | |
| 264 | static int db_sethook (lua_State *L) { |
no test coverage detected