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