Thanks, Steve!
Ar an cúigiú lá is fiche de mí na Samhain, scríobh Stephen J. Turnbull:
APPROVE COMMIT 21.5
* config.h.in:
diff -r a3aa49cd5d75 src/lread.c
--- a/src/lread.c Thu Nov 23 18:48:06 2017 +0000
+++ b/src/lread.c Sat Nov 25 17:48:54 2017 +0900
@@ -2644,6 +2644,9 @@
while ((c = readchar (readcharfun)) >= 0
&& c >= '0' && c <= '9')
{
+ /* #### I think this logic is wrong. Skip can be in the
+ range 0x40000000-0xffffffff, the overflow will not
+ trigger, but this won't fit in a fixnum. */
skip = (10 * skip) + (c - '0');
if (oskip <= skip)
This doesn’t have to fit into a fixnum, except for the error message, which
will work ok with make_unsigned_integer and bignum support.
diff -r a3aa49cd5d75 src/window-impl.h
--- a/src/window-impl.h Thu Nov 23 18:48:06 2017 +0000
+++ b/src/window-impl.h Sat Nov 25 17:48:54 2017 +0900
@@ -269,12 +269,12 @@
#define WINDOW_HAS_MODELINE_P(w) (!NILP (w->has_modeline_p))
#define MODELINE_OFF_SHADOW_THICKNESS_ADJUSTED(win) \
- abs ((!WINDOW_HAS_MODELINE_P (win) \
- ? ((XFIXNUM (win->modeline_shadow_thickness) > 1) \
- ? XFIXNUM (win->modeline_shadow_thickness) - 1 \
+ EMACS_INT_ABS ((!WINDOW_HAS_MODELINE_P (win) \
+ ? ((XFIXNUM (win->modeline_shadow_thickness) > 1) \
+ ? XFIXNUM (win->modeline_shadow_thickness) - 1 \
: ((XFIXNUM (win->modeline_shadow_thickness) < -1) \
? XFIXNUM (win->modeline_shadow_thickness) + 1 \
- : XFIXNUM (win->modeline_shadow_thickness))) \
+ : XFIXNUM (win->modeline_shadow_thickness))) \
: XFIXNUM (win->modeline_shadow_thickness)))
I had been holding off on making that change because all these values are
pixel widths, they really shouldn’t get values up to #x3fffffffffffffff, so
abs() should be fine with appropriate range restrictions. It would be nice
if there were integer specifiers that allowed more limitations on values.
The natnum specifier is the closest thing at the moment, and “greater than
-1” isn’t much of a restriction.
--
‘As I sat looking up at the Guinness ad, I could never figure out /
How your man stayed up on the surfboard after forty pints of stout’
(C. Moore)