Bug dans le fix precedent (PR#61)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3022 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Xavier Leroy 2000-03-30 17:33:43 +00:00
parent b20fb9e8fc
commit a64b49e9a3
1 changed files with 3 additions and 1 deletions

View File

@ -108,7 +108,9 @@ value obj_truncate (value v, value newsize) /* ML */
/* PR#61: since we're about to lose our references to the elements /* PR#61: since we're about to lose our references to the elements
beyond new_wosize in v, erase them explicitly so that the GC beyond new_wosize in v, erase them explicitly so that the GC
can darken them as appropriate. */ can darken them as appropriate. */
if (tag < No_scan_tag) {
for (i = new_wosize; i < wosize; i++) modify(&Field(v, i), Val_unit); for (i = new_wosize; i < wosize; i++) modify(&Field(v, i), Val_unit);
}
Field (v, new_wosize) = Field (v, new_wosize) =
Make_header (Wosize_whsize (wosize-new_wosize), 0, Caml_white); Make_header (Wosize_whsize (wosize-new_wosize), 0, Caml_white);
Hd_val (v) = Make_header (new_wosize, tag, color); Hd_val (v) = Make_header (new_wosize, tag, color);