[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Missing feature in 5.3: LUA_FLOAT_NONE for crippled C libraries
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 20 Oct 2015 15:09:01 -0200
> 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?