[Top][All Lists]

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

Re: Removing some workarounds for big integers

From: Paul Eggert
Subject: Re: Removing some workarounds for big integers
Date: Mon, 22 Apr 2019 11:45:12 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 4/22/19 9:59 AM, Philipp Stephani wrote:
>> +#define INTEGER_TO_INT(num, type)                                           
>>    \
>> +  (TYPE_SIGNED (type)                                                       
>>    \
>> +     ? ranged_integer_to_int ((num), TYPE_MINIMUM (type), TYPE_MAXIMUM 
>> (type)) \
>> +     : ranged_integer_to_uint ((num), TYPE_MINIMUM (type)))
>>                                        ^^^^^^^^^^^^
>> This should be TYPE_MAXIMUM.
> Thanks, fixed
More important, INTEGER_TO_INT's type conversion messes up and can cause
a signal on picky platforms. I installed the attached patch to undo that
change. Although lisp.lh really does need a better API for integer
conversion (and I'll volunteer to review/help if someone wants to work
on that!), INTEGER_TO_INT is not a step in the right direction; we need
something more general/accurate/whatever.

Attachment: 0001-Go-back-to-old-way-of-checking-json-int-range.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]