[squeak-dev] The Trunk: Network-ul.118.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun Sep 11 15:06:21 UTC 2011
Levente Uzonyi uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-ul.118.mcz
==================== Summary ====================
Name: Network-ul.118
Author: ul
Time: 11 September 2011, 4:44:33.297 pm
UUID: b9242777-ab04-c84d-817b-09b3c82276e6
Ancestors: Network-ul.117
Updated UUIDGenerator >> makeUnixSeed which now
- always returns an integer or nil (#next can return nil which causes MNU)
- uses StandardFileStream, because it doesn't need multi-byte support at all
=============== Diff against Network-ul.117 ===============
Item was changed:
----- Method: UUIDGenerator>>makeUnixSeed (in category 'random seed') -----
makeUnixSeed
+
+ ^[
+ StandardFileStream readOnlyFileNamed: '/dev/urandom' do: [ :stream |
+ stream binary.
+ (Integer
+ byte1: stream next
+ byte2: stream next
+ byte3: stream next
+ byte4: stream next) ] ]
+ on: Error
+ do: [ nil ]!
- ^[FileStream readOnlyFileNamed: '/dev/urandom' do: [:strm |
- strm binary.
- strm converter: Latin1TextConverter new.
- (Integer
- byte1: strm next
- byte2: strm next
- byte3: strm next
- byte4: strm next) normalize].
- ] on: FileStreamException do: [nil]!
More information about the Squeak-dev
mailing list
|