[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [patch] fix luai_num* null states
- From: Lourival Vieira Neto <lourival.neto@...>
- Date: Mon, 10 Mar 2014 12:30:26 -0300
On Thu, Mar 6, 2014 at 12:12 AM, Lourival Vieira Neto
> On Wed, Mar 5, 2014 at 1:59 PM, Roberto Ierusalimschy
> <firstname.lastname@example.org> wrote:
>>> > About the floating-point constants, by now what happens is that they
>>> > are accepted, but they are converted to integers. Another weird thing
>>> > (at least to me) is that I defined getlocaledecpoint() as '.', but the
>>> > lexer is still considering ','.
>>> Sorry.. my fault.. I've made some confusion.. ',' is handled correctly
>>> as the delimiter of values.. and the usage of floating-point constants
>>> (using '.') raises this neat error: 'malformed number' =)..
>> Did you do that without changing the source?
> Yes, just redefining LUA_NUMBER* and luai_num*.
Actually, redefining lua_str2number as strtoll. However, I noticed now
that this is incorrect because the manual states that integers must
wrap around in case of overflow. I have updated my patch to disable
luaO_str2d , instead of using strtoll.
Lourival Vieira Neto