[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Intercepting coroutine.create
- From: Javier Guerra <javier@...>
- Date: Thu, 7 Sep 2006 08:27:07 -0500
On Thursday 07 September 2006 8:17 am, Stefan Brantschen wrote:
> Is this a suitable approach? Anything that could be improved?
you could simplify a lot:
local _oldcreate = coroutine.create
function coroutine.create (...)
local cr = _oldcreate (...)
-- 'probe.hook' is the debugger's "hook" routine
debug.sethook(cr, probe.hook, "clr")
return cr
end
done! remember, 'coroutine' is a normal table, you can modify it
--
Javier
Attachment:
pgpRiPKom3IWP.pgp
Description: PGP signature