Skip to content
Snippets Groups Projects
Commit 9a0abdb7 authored by rtoy's avatar rtoy
Browse files

Use lowtag_Bits - 1 instead of a bare 2 when converting a fixnum

object to its value.
parent 56c86d17
No related branches found
No related tags found
No related merge requests found
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/print.c,v 1.26 2010/10/10 12:52:58 rtoy Exp $ */ /* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/print.c,v 1.27 2010/10/10 13:02:10 rtoy Exp $ */
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
...@@ -385,7 +385,7 @@ brief_otherptr(lispobj obj) ...@@ -385,7 +385,7 @@ brief_otherptr(lispobj obj)
#else #else
{ {
char *charptr = (char *) vector->data; char *charptr = (char *) vector->data;
int len = (int) (vector->length >> 2); int len = (int) (vector->length >> (logtag_Bits - 1);
while (len-- > 0) { while (len-- > 0) {
if ((charptr[0] == 0) if ((charptr[0] == 0)
...@@ -412,7 +412,7 @@ brief_otherptr(lispobj obj) ...@@ -412,7 +412,7 @@ brief_otherptr(lispobj obj)
#else #else
/* FIXME: Unicode hack! */ /* FIXME: Unicode hack! */
{ {
int len = (((struct vector *) ptr)->length) >> 2; int len = (((struct vector *) ptr)->length) >> (lowtag_Bits - 1);
unsigned short int *wcharptr = (unsigned short int *) vector->data; unsigned short int *wcharptr = (unsigned short int *) vector->data;
while (len-- > 0) { while (len-- > 0) {
...@@ -523,7 +523,7 @@ print_otherptr(lispobj obj) ...@@ -523,7 +523,7 @@ print_otherptr(lispobj obj)
} }
header = *ptr++; header = *ptr++;
length = (*ptr) >> 2; length = (*ptr) >> (lowtag_Bits - 1);
count = header >> 8; count = header >> 8;
type = TypeOf(header); type = TypeOf(header);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment