]> code.delx.au - gnu-emacs/blobdiff - src/bytecode.c
Fix typos.
[gnu-emacs] / src / bytecode.c
index 0d06890eabfc4e06794c90a9f5a04bb6b22f79d2..4cb9e7428fdfc75068179d69584c3286c117cac6 100644 (file)
@@ -1,6 +1,6 @@
 /* Execution of byte code produced by bytecomp.el.
    Copyright (C) 1985, 1986, 1987, 1988, 1993, 2000, 2001, 2002, 2003, 2004,
-                 2005, 2006 Free Software Foundation, Inc.
+                 2005, 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -433,8 +433,7 @@ If the third argument is incorrect, Emacs may crash.  */)
 #endif
 
   CHECK_STRING (bytestr);
-  if (!VECTORP (vector))
-    vector = wrong_type_argument (Qvectorp, vector);
+  CHECK_VECTOR (vector);
   CHECK_NUMBER (maxdepth);
 
   if (STRING_MULTIBYTE (bytestr))
@@ -542,14 +541,7 @@ If the third argument is incorrect, Emacs may crash.  */)
          {
            Lisp_Object v1;
            v1 = TOP;
-           if (CONSP (v1))
-             TOP = XCAR (v1);
-           else if (NILP (v1))
-             TOP = Qnil;
-           else
-             {
-               wrong_type_argument (Qlistp, v1);
-             }
+           TOP = CAR (v1);
            break;
          }
 
@@ -575,14 +567,7 @@ If the third argument is incorrect, Emacs may crash.  */)
          {
            Lisp_Object v1;
            v1 = TOP;
-           if (CONSP (v1))
-             TOP = XCDR (v1);
-           else if (NILP (v1))
-             TOP = Qnil;
-           else
-             {
-               wrong_type_argument (Qlistp, v1);
-             }
+           TOP = CDR (v1);
            break;
          }
 
@@ -612,7 +597,7 @@ If the third argument is incorrect, Emacs may crash.  */)
            if (SYMBOLP (sym)
                && !EQ (val, Qunbound)
                && !XSYMBOL (sym)->indirect_variable
-               && !XSYMBOL (sym)->constant
+               && !SYMBOL_CONSTANT_P (sym)
                && !MISCP (XSYMBOL (sym)->value))
              XSYMBOL (sym)->value = val;
            else
@@ -917,23 +902,10 @@ If the third argument is incorrect, Emacs may crash.  */)
            AFTER_POTENTIAL_GC ();
            op = XINT (v2);
            immediate_quit = 1;
-           while (--op >= 0)
-             {
-               if (CONSP (v1))
-                 v1 = XCDR (v1);
-               else if (!NILP (v1))
-                 {
-                   immediate_quit = 0;
-                   wrong_type_argument (Qlistp, v1);
-                 }
-             }
+           while (--op >= 0 && CONSP (v1))
+             v1 = XCDR (v1);
            immediate_quit = 0;
-           if (CONSP (v1))
-             TOP = XCAR (v1);
-           else if (NILP (v1))
-             TOP = Qnil;
-           else
-             wrong_type_argument (Qlistp, v1);
+           TOP = CAR (v1);
            break;
          }
 
@@ -1556,23 +1528,10 @@ If the third argument is incorrect, Emacs may crash.  */)
                AFTER_POTENTIAL_GC ();
                op = XINT (v2);
                immediate_quit = 1;
-               while (--op >= 0)
-                 {
-                   if (CONSP (v1))
-                     v1 = XCDR (v1);
-                   else if (!NILP (v1))
-                     {
-                       immediate_quit = 0;
-                       wrong_type_argument (Qlistp, v1);
-                     }
-                 }
+               while (--op >= 0 && CONSP (v1))
+                 v1 = XCDR (v1);
                immediate_quit = 0;
-               if (CONSP (v1))
-                 TOP = XCAR (v1);
-               else if (NILP (v1))
-                 TOP = Qnil;
-               else
-                 wrong_type_argument (Qlistp, v1);
+               TOP = CAR (v1);
              }
            else
              {
@@ -1634,10 +1593,7 @@ If the third argument is incorrect, Emacs may crash.  */)
          {
            Lisp_Object v1;
            v1 = TOP;
-           if (CONSP (v1))
-             TOP = XCAR (v1);
-           else
-             TOP = Qnil;
+           TOP = CAR_SAFE (v1);
            break;
          }
 
@@ -1645,10 +1601,7 @@ If the third argument is incorrect, Emacs may crash.  */)
          {
            Lisp_Object v1;
            v1 = TOP;
-           if (CONSP (v1))
-             TOP = XCDR (v1);
-           else
-             TOP = Qnil;
+           TOP = CDR_SAFE (v1);
            break;
          }