[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: Lourival Vieira Neto <lourival.neto@...>
- Date: Tue, 20 Oct 2015 15:30:04 -0200
On Tue, Oct 20, 2015 at 3:09 PM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>> 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.
Indeed.
> 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?
The main issue for me is that the subtype "float" is not completely
removed using this approach. For example, "1" + 0 results in float
subtype and 1 / 0 results in SIGFLOAT.
--
Lourival Vieira Neto