MCPcopy Create free account
hub / github.com/F-Stack/f-stack / db_gethook

Function db_gethook

app/redis-6.2.6/deps/lua/src/ldblib.c:282–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280
281
282static int db_gethook (lua_State *L) {
283 int arg;
284 lua_State *L1 = getthread(L, &arg);
285 char buff[5];
286 int mask = lua_gethookmask(L1);
287 lua_Hook hook = lua_gethook(L1);
288 if (hook != NULL && hook != hookf) /* external hook? */
289 lua_pushliteral(L, "external hook");
290 else {
291 gethooktable(L);
292 lua_pushlightuserdata(L, L1);
293 lua_rawget(L, -2); /* get hook */
294 lua_remove(L, -2); /* remove hook table */
295 }
296 lua_pushstring(L, unmakemask(mask, buff));
297 lua_pushinteger(L, lua_gethookcount(L1));
298 return 3;
299}
300
301
302static int db_debug (lua_State *L) {

Callers

nothing calls this directly

Calls 11

getthreadFunction · 0.85
gethooktableFunction · 0.85
unmakemaskFunction · 0.85
lua_gethookmaskFunction · 0.70
lua_gethookFunction · 0.70
lua_pushlightuserdataFunction · 0.70
lua_rawgetFunction · 0.70
lua_removeFunction · 0.70
lua_pushstringFunction · 0.70
lua_pushintegerFunction · 0.70
lua_gethookcountFunction · 0.70

Tested by

no test coverage detected