lua-users home
lua-l archive

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


I was just bitten by the lua_str2number #define.

I'm developing for a platform with no fpu and after changing the
LUA_NUMBER* macros to handle integers I discovered, after much
debugging, the additional lua_str2number macro buried in lobject.c.

I wonder if this macro should be included with the other LUA_NUMBER*
macros in lua.h?

This would make changing Lua's number type much easier and bulletproof.

Additionally, grouping all of the LUA_NUMBER* macros together in the
same section of lua.h would make it much more obvious exactly which
#defines affect the number type.

As of 5.1-work0 the LUA_NUMBER macro is in a different section of lua.h
than the other LUA_NUMBER* macros.

Please forgive me if this has changed in 5.1-work1.

Thanks.

-Kevin