Skip to content

Commit 7458a87

Browse files
committed
Update reflect.go
1 parent 1138d3d commit 7458a87

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

io/reflect.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
| |
77
| io/reflect.go |
88
| |
9-
| LastModified: May 8, 2021 |
9+
| LastModified: Aug 27, 2021 |
1010
| Author: Ma Bingyao <[email protected]> |
1111
| |
1212
\*________________________________________________________*/
@@ -25,7 +25,7 @@ import (
2525
)
2626

2727
type eface struct {
28-
typ uintptr
28+
typ unsafe.Pointer
2929
ptr unsafe.Pointer
3030
}
3131

@@ -63,7 +63,7 @@ func toSlice(array interface{}) (slice interface{}) {
6363
t := reflect.TypeOf(array)
6464
sliceType := reflect.SliceOf(t.Elem())
6565
sliceStruct := unpackEFace(&slice)
66-
sliceStruct.typ = (uintptr)(reflect2.PtrOf(sliceType))
66+
sliceStruct.typ = reflect2.PtrOf(sliceType)
6767
sliceStruct.ptr = unsafeToSlice(array, t.Len())
6868
return
6969
}
@@ -109,7 +109,6 @@ var float32PtrType = reflect.TypeOf((*float32)(nil))
109109
var float64PtrType = reflect.TypeOf((*float64)(nil))
110110
var complex64PtrType = reflect.TypeOf((*complex64)(nil))
111111
var complex128PtrType = reflect.TypeOf((*complex128)(nil))
112-
var interfacePtrType = reflect.TypeOf((*interface{})(nil))
113112
var bytesPtrType = reflect.TypeOf((*[]byte)(nil))
114113
var stringPtrType = reflect.TypeOf((*string)(nil))
115114
var timePtrType = reflect.TypeOf((*time.Time)(nil))

0 commit comments

Comments
 (0)