The Trunk: Collections-pre.763.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Collections-pre.763.mcz

commits-2
Patrick Rein uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-pre.763.mcz

==================== Summary ====================

Name: Collections-pre.763
Author: pre
Time: 31 August 2017, 3:14:26.5764 pm
UUID: ffff1838-0f68-9e49-bd57-6263eaebd8d7
Ancestors: Collections-pre.762, Collections-tonyg.734

Merges Collections-tonyg.734 which fixes Mantis #4665 and deals with the difference in counting at the public interface of streams and counting the steps in the underlying buffer.

=============== Diff against Collections-pre.762 ===============

Item was changed:
  ----- Method: PositionableStream>>upToAll: (in category 'accessing') -----
  upToAll: aCollection
  "Answer a subcollection from the current access position to the occurrence (if any, but not inclusive) of aCollection. If aCollection is not in the stream, answer the entire rest of the stream."
 
  | startPos endMatch result |
  startPos := self position.
  (self match: aCollection)
  ifTrue: [endMatch := self position.
  self position: startPos.
+ result := self upToPosition: endMatch - aCollection size.
- result := self next: endMatch - startPos - aCollection size.
  self position: endMatch.
  ^ result]
  ifFalse: [self position: startPos.
  ^ self upToEnd]!

Item was added:
+ ----- Method: PositionableStream>>upToPosition: (in category 'accessing') -----
+ upToPosition: anInteger
+ "Answer a subcollection containing items starting from the current position and ending including the given position. Usefully different to #next: in that in the case of MultiByteFileStream, and perhaps others, positions measure in terms of encoded items, while #next: convention is to name a number of items, independent of their encoding in the underlying buffer."
+ ^ self next: anInteger - position
+ !


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Collections-pre.763.mcz

David T. Lewis
On Thu, Aug 31, 2017 at 01:14:37PM +0000, [hidden email] wrote:

> Patrick Rein uploaded a new version of Collections to project The Trunk:
> http://source.squeak.org/trunk/Collections-pre.763.mcz
>
> ==================== Summary ====================
>
> Name: Collections-pre.763
> Author: pre
> Time: 31 August 2017, 3:14:26.5764 pm
> UUID: ffff1838-0f68-9e49-bd57-6263eaebd8d7
> Ancestors: Collections-pre.762, Collections-tonyg.734
>
> Merges Collections-tonyg.734 which fixes Mantis #4665 and deals with the difference in counting at the public interface of streams and counting the steps in the underlying buffer.
>

It's nice to see this issue resolved :-)

The Mantis issue http://bugs.squeak.org/view.php?id=4665 can be marked
as resolved now, but I don't have enough access privilege on Mantis
to do it. Can someone do the update?

Dave

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Collections-pre.763.mcz

Tobias Pape

> On 01.09.2017, at 00:44, David T. Lewis <[hidden email]> wrote:
>
> On Thu, Aug 31, 2017 at 01:14:37PM +0000, [hidden email] wrote:
>> Patrick Rein uploaded a new version of Collections to project The Trunk:
>> http://source.squeak.org/trunk/Collections-pre.763.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Collections-pre.763
>> Author: pre
>> Time: 31 August 2017, 3:14:26.5764 pm
>> UUID: ffff1838-0f68-9e49-bd57-6263eaebd8d7
>> Ancestors: Collections-pre.762, Collections-tonyg.734
>>
>> Merges Collections-tonyg.734 which fixes Mantis #4665 and deals with the difference in counting at the public interface of streams and counting the steps in the underlying buffer.
>>
>
> It's nice to see this issue resolved :-)
>
> The Mantis issue http://bugs.squeak.org/view.php?id=4665 can be marked
> as resolved now, but I don't have enough access privilege on Mantis
> to do it. Can someone do the update?

Done