[Top][All Lists]

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

Re: Removing some workarounds for big integers

From: Andy Moreton
Subject: Re: Removing some workarounds for big integers
Date: Mon, 22 Apr 2019 17:43:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt)

On Mon 22 Apr 2019, Philipp Stephani wrote:

> Am Sa., 22. Sept. 2018 um 01:12 Uhr schrieb Paul Eggert <address@hidden>:
>> Philipp Stephani wrote:
>> > It looks like Paul has already done most of this work in commit
>> > d77d01d22902acdc45c2c7059de4f1b158ab5806.
>> Yes, I've already replaced all uses of make_fixnum_or_float and 
>> There are still quite a few places that need looking at, though. Stefan
>> mentioned timestamps; I'll try to bump the priority of that.
> I've checked some of the remaining uses of CONS_TO_INTEGER. It seems
> some of them we can replace right away. For some others the
> documentation requires a number; we can detect integral floats for
> them, but should deprecate the float usage.

In commit 4e2ea400 ("Introduce a helper macro to convert a Lisp integer
to a C integer."):

+/* Return the integral value of NUM.  If NUM is too big for TYPE,
+   signal an error.  */
+#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.


reply via email to

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