(l *State, d Debug)
| 422 | func hookTable(l *State) bool { return SubTable(l, RegistryIndex, "_HKEY") } |
| 423 | |
| 424 | func internalHook(l *State, d Debug) { |
| 425 | hookNames := []string{"call", "return", "line", "count", "tail call"} |
| 426 | hookTable(l) |
| 427 | l.PushThread() |
| 428 | l.RawGet(-2) |
| 429 | if l.IsFunction(-1) { |
| 430 | l.PushString(hookNames[d.Event]) |
| 431 | if d.CurrentLine >= 0 { |
| 432 | l.PushInteger(d.CurrentLine) |
| 433 | } else { |
| 434 | l.PushNil() |
| 435 | } |
| 436 | _, ok := Info(l, "lS", d.callInfo) |
| 437 | l.assert(ok) |
| 438 | l.Call(2, 0) |
| 439 | } |
| 440 | } |
| 441 | |
| 442 | func maskToString(mask byte) (s string) { |
| 443 | if mask&MaskCall != 0 { |
nothing calls this directly
no test coverage detected