[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.0 (work3) now available
- From: Enrico Colombini <erix@...>
- Date: Tue, 18 May 2010 21:13:29 +0200
Luiz Henrique de Figueiredo wrote:
- light C functions
Are these just optimized C functions with no stack frame (and no C
closure) as I infer from the (work) 5.2 manual, or is there any other
difference?
I'm asking because I found Mike Pall's old suggestion
(http://lua-users.org/lists/lua-l/2006-09/msg01011.html):
"Add a kind of "light" C functions. This avoids building up a call frame
for every function call. These functions are a bit more restricted (like
no callbacks into Lua)"
But I see that lua_pushcfunction is just a macro for lua_pushcclosure:
#define lua_pushcfunction(L,f) lua_pushcclosure(L,f,0)
and lua_pushcclosure(L,f,0) creates a light C function, so I guess Lua
callbacks from light C functions are allowed. Is this so?
Enrico