fix .zo output on 64-bit platform for fixnum constants that are 32-bit bignums

svn: r7103
This commit is contained in:
Matthew Flatt 2007-08-15 11:09:37 +00:00
parent 502f1f2047
commit d113616d6b

View File

@ -1705,8 +1705,13 @@ print(Scheme_Object *obj, int notdisplay, int compact, Scheme_Hash_Table *ht,
s[0] = (unsigned char)(v + CPT_SMALL_NUMBER_START); s[0] = (unsigned char)(v + CPT_SMALL_NUMBER_START);
print_this_string(pp, (char *)s, 0, 1); print_this_string(pp, (char *)s, 0, 1);
} else { } else {
/* Make sure it's a fixnum on all platforms... */
if ((v >= -1073741824) && (v <= 1073741824)) {
print_compact(pp, CPT_INT); print_compact(pp, CPT_INT);
print_compact_number(pp, v); print_compact_number(pp, v);
} else {
print_escaped(pp, notdisplay, obj, ht, mt, 1);
}
} }
} else { } else {
sprintf(quick_buffer, "%ld", SCHEME_INT_VAL(obj)); sprintf(quick_buffer, "%ld", SCHEME_INT_VAL(obj));