Fix a runtime string hashing bug

darcs
slava 2006-06-09 22:22:37 +00:00
parent 60aa3fb680
commit 27d3728af3
2 changed files with 2 additions and 1 deletions

View File

@ -24,7 +24,7 @@ M: sbuf stream-flush drop ;
: map-last ( seq quot -- seq | quot: elt last? )
swap dup length <reversed>
[ zero? rot [ call ] keep swap ] 2map nip ;
[ zero? rot [ call ] keep swap ] 2map nip ; inline
M: plain-writer with-stream-table ( quot grid stream -- )
-rot [ [ swap string-out ] map-with ] map-with

View File

@ -16,6 +16,7 @@ F_STRING* allot_string(F_FIXNUM capacity)
UTF16 string for C library calls. */
cput(SREF(string,capacity),(u16)'\0');
string->length = tag_fixnum(capacity);
string->hashcode = F;
return string;
}