From: Karl Heuer Date: Tue, 23 May 1995 00:13:19 +0000 (+0000) Subject: (long_to_cons): Don't assume 32-bit longs. X-Git-Tag: emacs-19.34~3979 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b42cfa11948d4a5e942d94e9df1e3f385da1e0e7;p=emacs.git (long_to_cons): Don't assume 32-bit longs. --- 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)); }