However, there are (were?) restrictions when C functions are present on the call stack between `coroutine.resume` and coroutine.yield`.
Edit: not that low level, actually, here's the coroutine implementation, built on top of the public Lua C API:
http://www.lua.org/source/5.3/lcorolib.c.html
(167 lines including white space and comments).
However, there are (were?) restrictions when C functions are present on the call stack between `coroutine.resume` and coroutine.yield`.
Edit: not that low level, actually, here's the coroutine implementation, built on top of the public Lua C API:
http://www.lua.org/source/5.3/lcorolib.c.html
(167 lines including white space and comments).