lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> [...]
> 
> As you can see, the WrapFunc function never gets its return event
> reported to the debugging hook (and hence the indentation becomes
> imbalanced). If I instead call WrapFuncInner directly, this does not
> happen.

>From the Lua manual, about debug.sethook (emphasis added):

  When the hook is called, its first parameter is a string describing
  the event that has triggered its call: "call", "return" (OR "TAIL
  RETURN"), "line", and "count".


A search for "tail call" finds extra information.

-- Roberto