github.com/hirochachacha/plua@v0.0.0-20170217012138-c82f520cc725/stdlib/debug/testdata/gethook.lua (about) 1 function hook() end 2 debug.sethook(hook, "crl", 10) 3 f, mask, count = debug.gethook() 4 assert(f == hook and mask == "crl" and count == 10) 5 6 debug.sethook() 7 8 function hook() 9 f, mask, count = debug.gethook() 10 assert(f == hook and mask == "crl" and count == 10) 11 end 12 13 debug.sethook(hook, "clr", 10) 14 debug.sethook()