...
Source file
src/github.com/ugorji/go/codec/goversion_makemap_unsafe_gte_go110.go
1
2
3
4
5
6
7 package codec
8
9 import (
10 "reflect"
11 "unsafe"
12 )
13
14 func makeMapReflect(typ reflect.Type, size int) (rv reflect.Value) {
15 t := (*unsafeIntf)(unsafe.Pointer(&typ)).ptr
16 urv := (*unsafeReflectValue)(unsafe.Pointer(&rv))
17 urv.typ = t
18 urv.flag = uintptr(reflect.Map)
19 urv.ptr = makemap(t, size, nil)
20 return
21 }
22
23
24
25 func makemap(typ unsafe.Pointer, size int, h unsafe.Pointer) unsafe.Pointer
26
View as plain text