MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / db_gethook

Function db_gethook

Source/Misc/lua/src/lua.c:11798–11815  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11796
11797
11798static int db_gethook (lua_State *L) {
11799int arg;
11800lua_State *L1 = getthread(L, &arg);
11801char buff[5];
11802int mask = lua_gethookmask(L1);
11803lua_Hook hook = lua_gethook(L1);
11804if (hook != NULL && hook != hookf) /* external hook? */
11805lua_pushliteral(L, "external hook");
11806else {
11807gethooktable(L);
11808lua_pushlightuserdata(L, L1);
11809lua_rawget(L, -2); /* get hook */
11810lua_remove(L, -2); /* remove hook table */
11811}
11812lua_pushstring(L, unmakemask(mask, buff));
11813lua_pushinteger(L, lua_gethookcount(L1));
11814return 3;
11815}
11816
11817
11818static int db_debug (lua_State *L) {

Callers

nothing calls this directly

Calls 11

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

Tested by

no test coverage detected