mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
reflect: use []unsafe.Pointer instead of []*int
R=rsc CC=golang-dev https://golang.org/cl/6527043
This commit is contained in:
parent
ccf2b8843e
commit
384af66984
1 changed files with 3 additions and 3 deletions
|
|
@ -490,9 +490,9 @@ func (v Value) call(method string, in []Value) []Value {
|
|||
// TODO(rsc): revisit when reference counting happens.
|
||||
// The values are holding up the in references for us,
|
||||
// but something must be done for the out references.
|
||||
// For now make everything look like a pointer by pretending
|
||||
// to allocate a []*int.
|
||||
args := make([]*int, size/ptrSize)
|
||||
// For now make everything look like a pointer by allocating
|
||||
// a []unsafe.Pointer.
|
||||
args := make([]unsafe.Pointer, size/ptrSize)
|
||||
ptr := uintptr(unsafe.Pointer(&args[0]))
|
||||
off := uintptr(0)
|
||||
if v.flag&flagMethod != 0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue