CMUCL commit: src/lisp (print.c)
Raymond Toy
rtoy at common-lisp.net
Sun Oct 10 15:02:10 CEST 2010
Date: Sunday, October 10, 2010 @ 09:02:10
Author: rtoy
Path: /project/cmucl/cvsroot/src/lisp
Modified: print.c
Use lowtag_Bits - 1 instead of a bare 2 when converting a fixnum
object to its value.
---------+
print.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: src/lisp/print.c
diff -u src/lisp/print.c:1.26 src/lisp/print.c:1.27
--- src/lisp/print.c:1.26 Sun Oct 10 08:52:58 2010
+++ src/lisp/print.c Sun Oct 10 09:02:10 2010
@@ -1,4 +1,4 @@
-/* $Header: /project/cmucl/cvsroot/src/lisp/print.c,v 1.26 2010-10-10 12:52:58 rtoy Exp $ */
+/* $Header: /project/cmucl/cvsroot/src/lisp/print.c,v 1.27 2010-10-10 13:02:10 rtoy Exp $ */
#include <stdio.h>
#include <string.h>
@@ -385,7 +385,7 @@
#else
{
char *charptr = (char *) vector->data;
- int len = (int) (vector->length >> 2);
+ int len = (int) (vector->length >> (logtag_Bits - 1);
while (len-- > 0) {
if ((charptr[0] == 0)
@@ -412,7 +412,7 @@
#else
/* 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;
while (len-- > 0) {
@@ -523,7 +523,7 @@
}
header = *ptr++;
- length = (*ptr) >> 2;
+ length = (*ptr) >> (lowtag_Bits - 1);
count = header >> 8;
type = TypeOf(header);
More information about the cmucl-commit
mailing list