[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: verification and linting of lua implementations
- From: Roberto Ierusalimschy <roberto@...>
- Date: Sun, 2 Oct 2011 13:21:09 -0300
> On Fri, Sep 30, 2011 at 8:57 AM, Roberto Ierusalimschy
> <roberto@inf.puc-rio.br> wrote:
> > Do you know what is happening here?
> >
> > | -esym(767,setnvalue,TValuefields,NILCONSTANT,numfield,
> > | val_,num_,rttype,ttisnumber,ttisequal,checktag,
> > | settt_,setobj,lua_number2int,lua_number2integer,lua_number2unsigned)
> > | // macro defined differently in another module
>
> The "lua_number2int,lua_number2integer,lua_number2unsigned" are
> flagged due to the lack of a "#define LUA_CORE" in lctype.c (shouldn't
> this be there?).
Sure!
> [...] Moreover, these--and luai_hashnum which uses them--are not
> part of the API spec, so user programs including lua.h without
> LUA_CORE should not in theory use them either (if so, shouldn't these
> be renamed luai_number2* ?), but even if they did then the fallback
> "following definitions always work, but may be slow" will still be
> acceptable. So, it probably works but is a little confusing.
These macros are currently defined in 'llimits.h', which is an
internal header, so user programs including lua.h do not see those
definitions.
Thanks for the explanations,
-- Roberto