emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/eval.c


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/src/eval.c
Date: Mon, 26 Nov 2001 18:29:49 -0500

Index: emacs/src/eval.c
diff -u emacs/src/eval.c:1.175 emacs/src/eval.c:1.176
--- emacs/src/eval.c:1.175      Fri Nov 16 06:43:41 2001
+++ emacs/src/eval.c    Mon Nov 26 18:29:48 2001
@@ -1780,7 +1780,7 @@
      have an element whose index is COMPILED_INTERACTIVE, which is
      where the interactive spec is stored.  */
   else if (COMPILEDP (fun))
-    return ((XVECTOR (fun)->size & PSEUDOVECTOR_SIZE_MASK) > 
COMPILED_INTERACTIVE
+    return ((ASIZE (fun) & PSEUDOVECTOR_SIZE_MASK) > COMPILED_INTERACTIVE
            ? Qt : Qnil);
 
   /* Strings and vectors are keyboard macros.  */
@@ -2857,7 +2857,7 @@
        return Fsignal (Qinvalid_function, Fcons (fun, Qnil));
     }
   else if (COMPILEDP (fun))
-    syms_left = XVECTOR (fun)->contents[COMPILED_ARGLIST];
+    syms_left = AREF (fun, COMPILED_ARGLIST);
   else
     abort ();
 
@@ -2900,11 +2900,11 @@
     {
       /* If we have not actually read the bytecode string
         and constants vector yet, fetch them from the file.  */
-      if (CONSP (XVECTOR (fun)->contents[COMPILED_BYTECODE]))
+      if (CONSP (AREF (fun, COMPILED_BYTECODE)))
        Ffetch_bytecode (fun);
-      val = Fbyte_code (XVECTOR (fun)->contents[COMPILED_BYTECODE],
-                       XVECTOR (fun)->contents[COMPILED_CONSTANTS],
-                       XVECTOR (fun)->contents[COMPILED_STACK_DEPTH]);
+      val = Fbyte_code (AREF (fun, COMPILED_BYTECODE),
+                       AREF (fun, COMPILED_CONSTANTS),
+                       AREF (fun, COMPILED_STACK_DEPTH));
     }
   
   return unbind_to (count, val);
@@ -2918,14 +2918,19 @@
 {
   Lisp_Object tem;
 
-  if (COMPILEDP (object)
-      && CONSP (XVECTOR (object)->contents[COMPILED_BYTECODE]))
+  if (COMPILEDP (object) && CONSP (AREF (object, COMPILED_BYTECODE)))
     {
-      tem = read_doc_string (XVECTOR (object)->contents[COMPILED_BYTECODE]);
+      tem = read_doc_string (AREF (object, COMPILED_BYTECODE));
       if (!CONSP (tem))
-       error ("invalid byte code");
-      XVECTOR (object)->contents[COMPILED_BYTECODE] = XCAR (tem);
-      XVECTOR (object)->contents[COMPILED_CONSTANTS] = XCDR (tem);
+       {
+         tem = AREF (object, COMPILED_BYTECODE);
+         if (CONSP (tem) && STRINGP (XCAR (tem)))
+           error ("Invalid byte code in %s", XSTRING (XCAR (tem))->data);
+         else
+           error ("Invalid byte code");
+       }
+      AREF (object, COMPILED_BYTECODE) = XCAR (tem);
+      AREF (object, COMPILED_CONSTANTS) = XCDR (tem);
     }
   return object;
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]