From b42cfa11948d4a5e942d94e9df1e3f385da1e0e7 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Tue, 23 May 1995 00:13:19 +0000 Subject: [PATCH] (long_to_cons): Don't assume 32-bit longs. --- src/data.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data.c b/src/data.c index 9c7b4a62efb..0f23c1c6be0 100644 --- a/src/data.c +++ b/src/data.c @@ -1615,7 +1615,7 @@ DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, "T if NUMBER is zero.") return Qnil; } -/* Convert between 32-bit values and pairs of lispy 24-bit values. */ +/* Convert between full-sized long integers and pairs of lispy integers. */ Lisp_Object long_to_cons (i) @@ -1625,7 +1625,7 @@ long_to_cons (i) unsigned int bot = i & 0xFFFF; if (top == 0) return make_number (bot); - if (top == 0xFFFF) + if (top == (unsigned long)-1 >> 16) return Fcons (make_number (-1), make_number (bot)); return Fcons (make_number (top), make_number (bot)); } -- 2.39.2