lisp.h: Fix a problem with aliasing and vector headers.
[bpt/emacs.git] / src / print.c
index 2c9aa9d..8f55904 100644 (file)
@@ -1198,7 +1198,7 @@ print_preprocess (Lisp_Object obj)
          goto loop;
 
        case Lisp_Vectorlike:
-         size = XVECTOR (obj)->size;
+         size = XVECTOR_SIZE (obj);
          if (size & PSEUDOVECTOR_FLAG)
            size &= PSEUDOVECTOR_SIZE_MASK;
          for (i = 0; i < size; i++)
@@ -1786,7 +1786,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
              strout (SDATA (SYMBOL_NAME (h->weak)), -1, -1, printcharfun);
              PRINTCHAR (' ');
              sprintf (buf, "%ld/%ld", (long) h->count,
-                      (long) XVECTOR (h->next)->size);
+                      (long) XVECTOR_SIZE (h->next));
              strout (buf, -1, -1, printcharfun);
            }
          sprintf (buf, " 0x%lx", (unsigned long) h);
@@ -1797,7 +1797,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
            #s(hash-table size 2 test equal data (k1 v1 k2 v2)) */
          /* Always print the size. */
          sprintf (buf, "#s(hash-table size %ld",
-                  (long) XVECTOR (h->next)->size);
+                  (long) XVECTOR_SIZE (h->next));
          strout (buf, -1, -1, printcharfun);
 
          if (!NILP (h->test))
@@ -1909,7 +1909,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
        }
       else
        {
-         EMACS_INT size = XVECTOR (obj)->size;
+         EMACS_INT size = XVECTOR_SIZE (obj);
          if (COMPILEDP (obj))
            {
              PRINTCHAR ('#');
@@ -2025,7 +2025,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
        if (MISCP (obj))
          sprintf (buf, "(MISC 0x%04x)", (int) XMISCTYPE (obj));
        else if (VECTORLIKEP (obj))
-         sprintf (buf, "(PVEC 0x%08lx)", (unsigned long) XVECTOR (obj)->size);
+         sprintf (buf, "(PVEC 0x%08lx)", (unsigned long) XVECTOR_SIZE (obj));
        else
          sprintf (buf, "(0x%02x)", (int) XTYPE (obj));
        strout (buf, -1, -1, printcharfun);