MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / gethooktable

Function gethooktable

deps/lua/src/ldblib.c:245–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243
244
245static 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
258static int db_sethook (lua_State *L) {

Callers 2

db_sethookFunction · 0.85
db_gethookFunction · 0.85

Calls 5

lua_pushlightuserdataFunction · 0.85
lua_rawgetFunction · 0.85
lua_createtableFunction · 0.85
lua_pushvalueFunction · 0.85
lua_rawsetFunction · 0.85

Tested by

no test coverage detected