changeset 12527:ebaf016075f1

(Fbyte_code): For Beqlsign, if both args are ints, compare as ints.
author Karl Heuer <kwzh@gnu.org>
date Mon, 17 Jul 1995 22:09:03 +0000
parents b1afb2a250a1
children ed5b91dd829a
files src/bytecode.c
diffstat 1 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/bytecode.c	Mon Jul 17 21:55:53 1995 +0000
+++ b/src/bytecode.c	Mon Jul 17 22:09:03 1995 +0000
@@ -758,7 +758,18 @@
 	  v2 = POP; v1 = TOP;
 	  CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (v1, 0);
 	  CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (v2, 0);
-	  TOP = (XFLOATINT (v1) == XFLOATINT (v2)) ? Qt : Qnil;
+#ifdef LISP_FLOAT_TYPE
+	  if (FLOATP (num1) || FLOATP (num2))
+	    {
+	      double f1, f2;
+
+	      f1 = (FLOATP (v1) ? XFLOAT (v1)->data : XINT (v1));
+	      f2 = (FLOATP (v2) ? XFLOAT (v2)->data : XINT (v2));
+	      TOP = (f1 == f2 ? Qt : Qnil);
+	    }
+	  else
+#endif
+	    TOP = (XINT (num1) == XINT (num2) ? Qt : Qnil);
 	  break;
 
 	case Bgtr: