[squeak-dev] The Trunk: Collections-dtl.568.mcz

commits at source.squeak.org commits at source.squeak.org
Tue May 6 23:17:45 UTC 2014


David T. Lewis uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-dtl.568.mcz

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

Name: Collections-dtl.568
Author: dtl
Time: 5 May 2014, 12:39:30.026 pm
UUID: a7bc6178-b9ac-4b87-bf97-478cc4927158
Ancestors: Collections-eem.567

Add a flush to WriteStream>>nextChunkPut:

This is a workaround for a bug in the runtime library of some versions of Ubuntu. The symptom is that creation of a class comment for a class that previously had no comment leads to a file size error in the new RemoteStream that points to the class comment. Actual file size and contents of the changes file are not affected by this bug, and the error occurs when reading contents of the changes file immediately following the initial save, Flushing the stream after writing a chunk to the changes file prevents the problem.

=============== Diff against Collections-eem.567 ===============

Item was changed:
  ----- Method: WriteStream>>nextChunkPut: (in category 'fileIn/Out') -----
  nextChunkPut: aString
  	"Append the argument, aString, to the receiver, doubling embedded terminators."
  
  	| i remainder terminator |
  	terminator := $!!.
  	remainder := aString.
  	[(i := remainder indexOf: terminator) = 0] whileFalse:
  		[self nextPutAll: (remainder copyFrom: 1 to: i).
  		self nextPut: terminator.  "double imbedded terminators"
  		remainder := remainder copyFrom: i+1 to: remainder size].
  	self nextPutAll: remainder.
  	aString includesUnifiedCharacter ifTrue: [
  		self nextPut: terminator.
  		self nextPutAll: ']lang['.
  		aString writeLeadingCharRunsOn: self.
  	].
  	self nextPut: terminator.
+ 	self flush. "workaround for clib runtime bug on some platforms, affecting initial class comment creation"
  !



More information about the Squeak-dev mailing list