lua-users home
lua-l archive

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


On Tuesday 13, Mark Feldman wrote:
> Sorry, ignore all that, turns out my code was working with an older
> version of Lua. That's a real shame, having some sort of portable
> support for C-function coroutines would be useful :(

The CoCo patch for Lua 5.1 will allow you to yield/resume from C functions.
http://coco.luajit.org/

It isn't pure C code, since it has to used assembly to switch C-stacks, but it 
might work for you.  Also id doesn't change the Lua API and you don't have to 
use the switch hack to resume your C function.

-- 
Robert G. Jakabosky