lua-users home
lua-l archive

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


On Wed, Nov 17, 2010 at 6:25 PM, Mark Hamburg <mark@grubmah.com> wrote:
> * Lightweight C functions and hence a truly useful replacement for the somewhat awkward lua_cpcall....

Lightweight C function support is one of the most useful 5.2 changes
to me (apart from other things like bitlib that LuaJIT already
does/will cover).  It avoids the awkwardness of protecting
lua_pushcfunction against raising and of passing arguments/returns
though lua_cpcall, plus they needlessly alloc.  Does LuaJiT already
support it?  One thing that concerns me here is that in 5.2, "C
functions do not have environments any more"--is that a problem when
backporting lightweight C functions to 5.1/LuaJIT?    Related to this,
I see LuaJIT already supports 5.2 style xpcall arguments.

lua_copy may be worthwhile too, as it may be slightly faster than 5.1
alternatives.

On Wed, Nov 17, 2010 at 7:19 AM, Mike Pall <mikelu-1011@mike.de> wrote:
> Does anyone object to adding support for this unconditionally?

Good question.