Skip to content

Commit

Permalink
move definitions later in the load sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
bkamins committed Jul 22, 2019
1 parent 1113baa commit 617bd1d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 3 additions & 0 deletions base/multidimensional.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1743,3 +1743,6 @@ function _sortslices(A::AbstractArray, d::Val{dims}; kws...) where dims
B
end
end

getindex(b::Ref, ::CartesianIndex{0}) = getindex(b)
setindex!(b::Ref, x, ::CartesianIndex{0}) = setindex!(b, x)
3 changes: 0 additions & 3 deletions base/refpointer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@ cconvert(::Type{Ref{P}}, a::Array) where {P<:Union{Ptr,Cwstring,Cstring}} = Ref{
###

getindex(b::RefArray) = b.x[b.i]
getindex(b::RefArray, ::CartesianIndex{0}) = getindex(b)

setindex!(b::RefArray, x) = (b.x[b.i] = x; b)
setindex!(b::RefArray, x, ::CartesianIndex{0}) = setindex!(b, x)

###
3 changes: 0 additions & 3 deletions base/refvalue.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,4 @@ end
unsafe_convert(::Type{Ptr{Cvoid}}, b::RefValue{T}) where {T} = convert(Ptr{Cvoid}, unsafe_convert(Ptr{T}, b))

getindex(b::RefValue) = b.x
getindex(b::RefValue, ::CartesianIndex{0}) = getindex(b)

setindex!(b::RefValue, x) = (b.x = x; b)
setindex!(b::RefValue, x, ::CartesianIndex{0}) = setindex!(b, x)

0 comments on commit 617bd1d

Please sign in to comment.