Skip to content

Commit

Permalink
Don't use do as variable name in doc strings. (#53924)
Browse files Browse the repository at this point in the history
  • Loading branch information
lassepe authored Apr 15, 2024
1 parent 98f4747 commit 7ba1b33
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions base/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -275,13 +275,13 @@ function unsafe_copyto!(dest::Ptr{T}, src::Ptr{T}, n) where T
end

"""
unsafe_copyto!(dest::Array, do, src::Array, so, N)
unsafe_copyto!(dest::Array, doffs, src::Array, soffs, n)
Copy `N` elements from a source array to a destination, starting at the linear index `so` in the
source and `do` in the destination (1-indexed).
Copy `n` elements from a source array to a destination, starting at the linear index `soffs` in the
source and `doffs` in the destination (1-indexed).
The `unsafe` prefix on this function indicates that no validation is performed to ensure
that N is inbounds on either array. Incorrect usage may corrupt or segfault your program, in
that n is inbounds on either array. Incorrect usage may corrupt or segfault your program, in
the same manner as C.
"""
function unsafe_copyto!(dest::Array, doffs, src::Array, soffs, n)
Expand All @@ -291,10 +291,10 @@ function unsafe_copyto!(dest::Array, doffs, src::Array, soffs, n)
end

"""
copyto!(dest, do, src, so, N)
copyto!(dest, doffs, src, soffs, n)
Copy `N` elements from collection `src` starting at the linear index `so`, to array `dest` starting at
the index `do`. Return `dest`.
Copy `n` elements from collection `src` starting at the linear index `soffs`, to array `dest` starting at
the index `doffs`. Return `dest`.
"""
copyto!(dest::Array, doffs::Integer, src::Array, soffs::Integer, n::Integer) = _copyto_impl!(dest, doffs, src, soffs, n)
copyto!(dest::Array, doffs::Integer, src::Memory, soffs::Integer, n::Integer) = _copyto_impl!(dest, doffs, src, soffs, n)
Expand Down

0 comments on commit 7ba1b33

Please sign in to comment.