5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-12-01 09:01:35 +00:00
matterbridge/vendor/github.com/modern-go/reflect2/go_below_118.go

21 lines
531 B
Go
Raw Normal View History

2021-12-11 23:05:15 +00:00
//+build !go1.18
package reflect2
import (
"unsafe"
)
// m escapes into the return value, but the caller of mapiterinit
// doesn't let the return value escape.
//go:noescape
//go:linkname mapiterinit reflect.mapiterinit
func mapiterinit(rtype unsafe.Pointer, m unsafe.Pointer) (val *hiter)
func (type2 *UnsafeMapType) UnsafeIterate(obj unsafe.Pointer) MapIterator {
return &UnsafeMapIterator{
hiter: mapiterinit(type2.rtype, *(*unsafe.Pointer)(obj)),
pKeyRType: type2.pKeyRType,
pElemRType: type2.pElemRType,
}
}