lua-users home
lua-l archive

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


Hi,

Roberto Ierusalimschy wrote:
> > - The luai_num* macros lost their first argument 'L'.
> 
> There is another problem. Some functions that use those macros
> do not even have the state as argument. (luaH_getnum, luaH_get,
> arrayindex, luaO_rawequalObj, plus constfolding). Because those
> macros did not use L, the error went undetected in 5.1 alpha.
> 
> Of course we can add the L only on some macros (i.e., do not put
> it on luai_numeq), but we still have the problem with constfolding...

Ah, ok. So we better leave out the L and specify these macros
as 'not allowed to throw errors'.

> > Adding definitions for the 3 1/2 interesting cases to luaconf.h
> > shouldn't be too much overhead. This would be double, float,
> > int/long (long only for 16 bit systems).
> 
> This seems the perfect job to be done outside the distribution,
> by somebody else (so people do not complain with us if it has
> some bug :) We can even add some comment about that in luaconf
> (something like "see the Lua wiki for instructions on how to
> compile Lua for other numeric types").

Sure, we could do that. Rici Lake contributed the missing
functions for the integer variant some time ago. And there
have been suggestions about what to do with lmathlib.c, too.
It's more a matter of collecting all pieces in one place.

This still leaves the define that allows for telling the
different lua_Number types apart with CPP. It should be
in the standard luaconf.h:

  #define LUA_NUMBER_PRECISION	53

[Yes, this may be wrong on (more or less extinct) non-IEEE 754
compliant systems, but at least it's consistently wrong. :-)]

> > There are still some upper-case element/attribute names left.
> 
> Can you locate them?

grep -e '<[A-Z]' -e '<[^>] [A-Z]' doc/*html

But I was under the impression that these are generated
documents? If not ... well, then it's a lot easier to load
them into an HTML editor and save them as xhtml. This will
take care of the missing end tags as well. I bet there are
some online services for this, too.
[Sorry, no quick recommendations.]

Bye,
     Mike