lua-users home
lua-l archive

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


> You might want to take a look at [1]. However, I still need to fix few
> bugs found by Guilherme Salazar during this year GSoC and update to
> 5.3.1.
> 
> [1] https://github.com/lneto/lua/tree/no-float

This is extensive surgery, not particularly hard to do but boring and
error prone to do for each Lua release.

I wondered how far one would go by simply adding
	#define double long
at the top of luaconf.h and fixing a few library calls...

I did just that for Lua 5.3.1 and got just a few compilation errors,
mostly about LUA_NUMBER_FMT being wrong for long and for implicit
conversion of double values to long in lmathlib.c (which would really
need to be changed).

Bottom line: it seems to be straightforward to add support for
LUA_FLOAT_NONE in luaconf.h.

What am I missing?