diff --git a/base/pointer.jl b/base/pointer.jl index 3c8cd3e3df998..0002ac2596b98 100644 --- a/base/pointer.jl +++ b/base/pointer.jl @@ -62,8 +62,8 @@ eltype{T}(::Ptr{T}) = T ==(x::Ptr, y::Ptr) = uint(x) == uint(y) -(x::Ptr, y::Ptr) = uint(x) - uint(y) -+(x::Ptr, y::Integer) = oftype(x, uint(uint(x) + y)) --(x::Ptr, y::Integer) = oftype(x, uint(uint(x) - y)) ++(x::Ptr, y::Integer) = oftype(x, (uint(x) + (y % UInt) % UInt)) +-(x::Ptr, y::Integer) = oftype(x, (uint(x) - (y % UInt) % UInt)) +(x::Integer, y::Ptr) = y + x zero{T}(::Type{Ptr{T}}) = convert(Ptr{T}, 0)