changeset 11879:606889516975

(long_to_cons): Don't assume 32-bit longs.
author Karl Heuer <kwzh@gnu.org>
date Tue, 23 May 1995 00:13:19 +0000
parents 86257fdd585c
children 9d247297e826
files src/data.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/data.c	Tue May 23 00:11:46 1995 +0000
+++ b/src/data.c	Tue May 23 00:13:19 1995 +0000
@@ -1615,7 +1615,7 @@
   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 @@
   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));
 }