Re: The Trunk: Files-eem.134.mcz

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

Re: The Trunk: Files-eem.134.mcz

Nicolas Cellier
These changes are making some of the BitmapStreamTests fail.
Believe it or not, a WordArray is passed to this method...
And this seems a normal op, since #primitiveFileWrite is prepared to handle that...


2014-05-03 2:19 GMT+02:00 <[hidden email]>:
Eliot Miranda uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-eem.134.mcz

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

Name: Files-eem.134
Author: eem
Time: 2 May 2014, 5:19:13.06 pm
UUID: eaf22de5-75b8-4350-b6a5-2fc8ae1077a7
Ancestors: Files-eem.133

Make the Files-eem.133 fix robust when the collection type
doesn't match buffer1's type.

=============== Diff against Files-eem.133 ===============

Item was changed:
  ----- Method: StandardFileStream>>nextPutAll: (in category 'read, write, position') -----
  nextPutAll: aString
        "Write all the characters of the given string to this file."
        | size |
        rwmode ifFalse: [^ self error: 'Cannot write a read-only file'].
        collection ifNotNil: [
                position < readLimit ifTrue: [ self flushReadBuffer ] ].
        (size := aString size) > 0 ifTrue:
+               [buffer1
+                       at: 1
+                       put: ((buffer1 at: 1) isCharacter
+                                       ifTrue: [(aString at: size) asCharacter]
+                                       ifFalse: [(aString at: size) asInteger]).
-               [buffer1 at: 1 put: (aString at: size).
                 self primWrite: fileID from: aString startingAt: 1 count: aString basicSize].
        ^ aString
  !