[FIX] Proper Endianness restoration ( [er][et]
ShortIntegerArray is broken; here's fixes and tests )
Yoshiki Ohshima
Yoshiki.Ohshima at acm.org
Mon Mar 8 05:49:34 CET 2004
Ned,
It looks like a nice test. My tendency towards hacking dominates so
I looked over the ShortIntegerArray...
For the ShortRunArray case, a ShortRunArray and its 'swapped'
version can behave very differently when the 'value' is zero. This is
because #size of the ShortRunArray is based on the 'runs' data.
For example, suppose we have a ShortRunArray instance whose runs and
values look like:
((2 0)) "A four-byte instance. the upper 16-bit represent 2 and lower represents 0."
If I send the #size to this instance, it returns two because the
runs' value is two. But, if we are loading the serialized version of
this guy from a ReferenceStream, the data looks like at one point:
((0 512))
and #size of this guy returns 0.
I'm saying that for ShortRunArray's case, we might want to add a
non-random version of data to ensure this is properly handled and to
indicate we are aware of this.
Thank you!
-- Yoshiki
More information about the Squeak-harvest
mailing list