lua-users home
lua-l archive

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

> Since API functions are allowed to be macros, why not take advantage of this
> and 
> #define lua_strlen(L, s) lua__strlen(s)
> (and similarly for other functions that don't use the state)?

lua_strlen does need the state; its argument is an index to the stack. 
Currently, the only function in the API that does not use the state is the 
(now famous ;-) lua_typename. But even this one may need the stack in the 
next version. 

-- Roberto