lua-users home
lua-l archive

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


> All places that might need to be changed are marked in the code 
> with LUA_NUMBER.
> In 4.0b, these are the only places:
> 
> % grep LUA_NUMBER *.[ch]
> liolib.c:    if (lua_type(L, arg)[2] == 'm') {  /* nuMber? */  /* 
> LUA_NUMBER */
> llex.c:/* LUA_NUMBER */
> llimits.h:** GREP LUA_NUMBER to change that
> lobject.c:int luaO_str2d (const char *s, Number *result) {  /* 
> LUA_NUMBER */
> lundump.h:#define NUMBER_FMT    "%.16g"         /* LUA_NUMBER */
> lvm.c:int luaV_tonumber (TObject *obj) {  /* LUA_NUMBER */
> lvm.c:int luaV_tostring (lua_State *L, TObject *obj) {  /* LUA_NUMBER */

There were a few places that hardcode the 'double' type as well, which
had to be changed to long (lua.h). But all in all, there are not many
such places, and my long-only Lua works very nicely. I don't do number
crunching with it though, so numeric operators are seldom used.

-- 
Lyrian