lua-users home
lua-l archive

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


I have some code now in heavily development, lsched, A C implement coroutine scheduler that inspired by Lumen. it's here now: https://github.com/starwing/luasched

you see, this is a C Library for both C module and Lua script -- means, it must offer APIs for C that balance the stack. it indeed offers much of them, detail documents is in header file.

some implement of APIs and exported routines must use some helper about Lua stack: you could see copy_stack, and sooooo many lua_pop (which is just a macro of lua_settop).

another library is lbind, A Lua binding generator runtime C code, it offers, again, some APIs for both C module and Lua script. meet same issue, either.

I means, maybe in normal C module the current C API is good, but it makes C API author (like me, write C code used by other C module, that offer services to other C module) unhappy :(

that's reason I raise up the suggestions.



2014-03-10 9:48 GMT+08:00 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>:
I have arrived late to this thread but in what I've read I can't find a
single concrete example of how more stack operations in the API would
simplify existing code, either in the core or somewhere else. I don't
mind being proved wrong, though. So, let's see some code...




--
regards,
Xavier Wang.