[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua_strlen
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 20 Nov 2000 10:26:39 -0200
> 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