mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
reflect: rename reflect.ArrayCopy to be reflect.Copy.
R=r CC=golang-dev https://golang.org/cl/3601041
This commit is contained in:
parent
7ec69c179d
commit
73fd298901
5 changed files with 8 additions and 8 deletions
|
|
@ -400,11 +400,11 @@ type ArrayOrSliceValue interface {
|
|||
addr() addr
|
||||
}
|
||||
|
||||
// ArrayCopy copies the contents of src into dst until either
|
||||
// Copy copies the contents of src into dst until either
|
||||
// dst has been filled or src has been exhausted.
|
||||
// It returns the number of elements copied.
|
||||
// The arrays dst and src must have the same element type.
|
||||
func ArrayCopy(dst, src ArrayOrSliceValue) int {
|
||||
func Copy(dst, src ArrayOrSliceValue) int {
|
||||
// TODO: This will have to move into the runtime
|
||||
// once the real gc goes in.
|
||||
de := dst.Type().(ArrayOrSliceType).Elem()
|
||||
|
|
@ -439,7 +439,7 @@ func (v *ArrayValue) Set(x *ArrayValue) {
|
|||
panic(cannotSet)
|
||||
}
|
||||
typesMustMatch(v.typ, x.typ)
|
||||
ArrayCopy(v, x)
|
||||
Copy(v, x)
|
||||
}
|
||||
|
||||
// Set sets v to the value x.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue