Skip to content

Commit

Permalink
math: fix compile on 32 bit systems
Browse files Browse the repository at this point in the history
  • Loading branch information
ncw committed Aug 5, 2018
1 parent 9e5c0d4 commit 32e35ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions math/math.go
Original file line number Diff line number Diff line change
Expand Up @@ -882,9 +882,9 @@ func math_ldexp(self py.Object, args py.Tuple) (py.Object, error) {
return nil, err
}
if lt == py.True {
exp = py.IntMin
exp = py.GoIntMin
} else {
exp = py.IntMax
exp = py.GoIntMax
}
}
if x == 0. || !isFinite(x) {
Expand Down
5 changes: 5 additions & 0 deletions py/int.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ const (
IntMin = math.MinInt64
// The largest number such that sqrtIntMax**2 < IntMax
sqrtIntMax = 3037000499
// Go integer limits
GoUintMax = ^uint(0)
GoUintMin = 0
GoIntMax = int(GoUintMax >> 1)
GoIntMin = -GoIntMax - 1
)

// Type of this Int object
Expand Down

0 comments on commit 32e35ae

Please sign in to comment.