MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / gethooktable

Function gethooktable

other_src/lua/src/ldblib.cpp:251–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249
250
251static 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
264static int db_sethook (lua_State *L) {

Callers 2

db_sethookFunction · 0.70
db_gethookFunction · 0.70

Calls 5

lua_pushlightuserdataFunction · 0.70
lua_rawgetFunction · 0.70
lua_createtableFunction · 0.70
lua_pushvalueFunction · 0.70
lua_rawsetFunction · 0.70

Tested by

no test coverage detected