]> code.delx.au - gnu-emacs/blobdiff - src/bytecode.c
Declare calloc like malloc.
[gnu-emacs] / src / bytecode.c
index a6230a6142ab1f41f1bffee40ae92419e576ef2a..cc5b46047db82627651e932849976db7919ea3e7 100644 (file)
@@ -341,24 +341,8 @@ If the third argument is incorrect, Emacs may crash.")
          else
            {
              v2 = XSYMBOL (v1)->value;
-#ifdef SWITCH_ENUM_BUG
-             switch ((int) XTYPE (v2))
-#else
-             switch (XTYPE (v2))
-#endif
-               {
-               case Lisp_Symbol:
-                 if (!EQ (v2, Qunbound))
-                   break;
-               case Lisp_Intfwd:
-               case Lisp_Boolfwd:
-               case Lisp_Objfwd:
-               case Lisp_Buffer_Local_Value:
-               case Lisp_Some_Buffer_Local_Value:
-               case Lisp_Buffer_Objfwd:
-               case Lisp_Void:
-                 v2 = Fsymbol_value (v1);
-               }
+             if (MISCP (v2) || EQ (v2, Qunbound))
+               v2 = Fsymbol_value (v1);
            }
          PUSH (v2);
          break;
@@ -774,7 +758,18 @@ If the third argument is incorrect, Emacs may crash.")
          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 (v1) || FLOATP (v2))
+           {
+             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 (v1) == XINT (v2) ? Qt : Qnil);
          break;
 
        case Bgtr:
@@ -877,12 +872,12 @@ If the third argument is incorrect, Emacs may crash.")
          break;
 
        case Bfollowing_char:
-         XSETFASTINT (v1, PT == ZV ? 0 : FETCH_CHAR (point));
+         v1 = Ffollowing_char ();
          PUSH (v1);
          break;
 
        case Bpreceding_char:
-         XSETFASTINT (v1, point <= BEGV ? 0 : FETCH_CHAR (point - 1));
+         v1 = Fprevious_char ();
          PUSH (v1);
          break;
 
@@ -953,7 +948,7 @@ If the third argument is incorrect, Emacs may crash.")
        case Bchar_syntax:
          CHECK_NUMBER (TOP, 0);
          XSETFASTINT (TOP,
-                      syntax_code_spec[(int) SYNTAX (0xFF & XINT (TOP))]);
+                      syntax_code_spec[(int) SYNTAX (XINT (TOP))]);
          break;
 
        case Bbuffer_substring: