[squeak-dev] The Trunk: Multilingual-ul.216.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Aug 27 17:21:52 UTC 2016


Levente Uzonyi uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-ul.216.mcz

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

Name: Multilingual-ul.216
Author: ul
Time: 27 August 2016, 7:06:05.615071 pm
UUID: a2be34e3-fc9a-4e8c-8f73-4ac710da8f30
Ancestors: Multilingual-tfel.215

Don't let #next:putAll:startingAt:toStream: roll back the receiver when the first argument is negative. This isn't mandatory with the current implementation if #next:putAll:startingAt: ignores negative counts.

=============== Diff against Multilingual-tfel.215 ===============

Item was changed:
  ----- Method: TextConverter>>next:putAll:startingAt:toStream: (in category 'conversion') -----
  next: anInteger putAll: aString startingAt: startIndex toStream: aStream
  	"Handle fast conversion if ByteString"
  	
  	| lastIndex nextIndex |
+ 	anInteger > 0 ifFalse: [ ^aString ].
+ 	aStream isBinary ifTrue: [
+ 		aStream basicNext: anInteger putAll: aString startingAt: startIndex.
+ 		^aString ].
  	aString class == ByteString ifFalse: [
  		startIndex to: startIndex + anInteger - 1 do: [ :index |
  			self nextPut: (aString at: index) toStream: aStream ].
  		^aString ].
- 	aStream isBinary ifTrue: [
- 		aStream basicNext: anInteger putAll: aString startingAt: startIndex.
- 		^aString ].
  	lastIndex := startIndex.
  	[ (nextIndex := ByteString 
  		findFirstInString: aString
  		inSet: latin1Map
  		startingAt: lastIndex) = 0 or: [ anInteger + startIndex <= nextIndex ] ] whileFalse: [
  			aStream
  				basicNext: nextIndex - lastIndex putAll: aString startingAt: lastIndex;
  				basicNextPutAll: (latin1Encodings at: (aString byteAt: nextIndex) + 1).
  			lastIndex := nextIndex + 1 ].
  	aStream basicNext: anInteger - lastIndex + startIndex putAll: aString startingAt: lastIndex.
  	^aString!



More information about the Squeak-dev mailing list