lua-users home
lua-l archive

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


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: pgpKWXrvjUcvr.pgp
Description: PGP signature