MCPcopy Create free account
hub / github.com/segmentio/encoding / pointerCodecOf

Function pointerCodecOf

proto/pointer.go:8–17  ·  view source on GitHub ↗
(t reflect.Type, seen map[reflect.Type]*codec)

Source from the content-addressed store, hash-verified

6)
7
8func pointerCodecOf(t reflect.Type, seen map[reflect.Type]*codec) *codec {
9 p := new(codec)
10 seen[t] = p
11 c := codecOf(t.Elem(), seen)
12 p.wire = c.wire
13 p.size = pointerSizeFuncOf(t, c)
14 p.encode = pointerEncodeFuncOf(t, c)
15 p.decode = pointerDecodeFuncOf(t, c)
16 return p
17}
18
19func pointerSizeFuncOf(t reflect.Type, c *codec) sizeFunc {
20 return func(p unsafe.Pointer, flags flags) int {

Callers 1

codecOfFunction · 0.85

Calls 5

codecOfFunction · 0.85
pointerSizeFuncOfFunction · 0.85
pointerEncodeFuncOfFunction · 0.85
pointerDecodeFuncOfFunction · 0.85
ElemMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…