Browse files

Simplify make_seed and undo 7b44eb now that register shifts are safe

This needs to be tested more on 32-bit machines

As per discussion: 7b44ebe
  • Loading branch information...
1 parent cc6421c commit 11fb706a1dd2d33a0559f1cfe1784f5d3a16bdee Joseph Perla committed Mar 2, 2014
Showing with 2 additions and 3 deletions.
  1. +2 −3 base/random.jl
View
5 base/random.jl
@@ -83,11 +83,10 @@ function make_seed(n::Integer)
seed = Uint32[]
while true
push!(seed, n & 0xffffffff)
- n2 = n >> 32
- if n2 == 0 || n2 == n
+ n >>= 32
+ if n == 0
return seed
end
- n = n2
end
end

0 comments on commit 11fb706

Please sign in to comment.