Skip to content

Commit

Permalink
Merge pull request #7521 from JuliaLang/dcj/memmove
Browse files Browse the repository at this point in the history
Use memmove instead of memcpy in copy! Fixes #3937
  • Loading branch information
JeffBezanson committed Jul 4, 2014
2 parents 842e553 + 27d9eed commit 3c9fe82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ isassigned(a::Array, i::Int...) = isdefined(a, i...)
## copy ##

function unsafe_copy!{T}(dest::Ptr{T}, src::Ptr{T}, N)
ccall(:memcpy, Ptr{Void}, (Ptr{Void}, Ptr{Void}, Uint),
ccall(:memmove, Ptr{Void}, (Ptr{Void}, Ptr{Void}, Uint),
dest, src, N*sizeof(T))
return dest
end
Expand Down

0 comments on commit 3c9fe82

Please sign in to comment.