[squeak-dev] The Trunk: Files-nice.48.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Mon Dec 7 18:33:33 UTC 2009


2009/12/7 Levente Uzonyi <leves at elte.hu>:
> On Mon, 7 Dec 2009, commits at source.squeak.org wrote:
>
>> Nicolas Cellier uploaded a new version of Files to project The Trunk:
>> http://source.squeak.org/trunk/Files-nice.48.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Files-nice.48
>> Author: nice
>> Time: 7 December 2009, 8:13:37 am
>> UUID: d694d4c7-8bb3-9f41-bcaf-805c955c64d8
>> Ancestors: Files-ul.47
>>
>> Restore the semantics of #readInto:startingAt:count: to return the number
>> of bytes read
>
> It seems like I missed that, nice find. :)
>
>
> Levente
>

Simple, I use this in my benchmarks :)
The test coverage for file streams is so poor... (maybe we'd better
not dig too deep, we might discover weird behaviors)
Anyway, thank you for the good job. You made integration of buffered
read stream quite a simple thing that works
(probably the simplest that could possibly work).

Nicolas

>>
>> =============== Diff against Files-ul.47 ===============
>>
>> Item was changed:
>>  ----- Method: StandardFileStream>>readInto:startingAt:count: (in category
>> 'read, write, position') -----
>>  readInto: byteArray startingAt: startIndex count: count
>>        "Read into the given array as specified, and return the count
>>        actually transferred.  index and count are in units of bytes or
>>        longs depending on whether the array is Bitmap, String or
>> ByteArray"
>>
>> +       ^(self next: count into: byteArray startingAt: startIndex) size -
>> startIndex + 1
>> -       ^self next: count into: byteArray startingAt: startIndex
>>  !
>>
>>
>>
>
>



More information about the Squeak-dev mailing list