[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Strange way to determine whether it is Lua or C function
- From: Egor Skriptunoff <egor.skriptunoff@...>
- Date: Mon, 24 Aug 2020 18:01:36 +0300
On Mon, Aug 24, 2020 at 10:50 AM Viacheslav Usov wrote:
the following code seems to achieve the same effect without coroutines
You forgot to unhook (to save and restore the original hook).
So, using a temporary coroutine does make sense here.
BTW, "error(0)" could be replaced with just "x()" :-)