MCPcopy Create free account
hub / github.com/defold/defold / db_gethook

Function db_gethook

engine/lua/src/lua/ldblib.c:281–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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