MCPcopy Index your code
hub / github.com/segmentio/encoding / pointerEncodeFuncOf

Function pointerEncodeFuncOf

proto/pointer.go:31–41  ·  view source on GitHub ↗
(t reflect.Type, c *codec)

Source from the content-addressed store, hash-verified

29}
30
31func pointerEncodeFuncOf(t reflect.Type, c *codec) encodeFunc {
32 return func(b []byte, p unsafe.Pointer, flags flags) (int, error) {
33 if p != nil {
34 if !flags.has(inline) {
35 p = *(*unsafe.Pointer)(p)
36 }
37 return c.encode(b, p, flags.without(inline).with(wantzero))
38 }
39 return 0, nil
40 }
41}
42
43func pointerDecodeFuncOf(t reflect.Type, c *codec) decodeFunc {
44 t = t.Elem()

Callers 1

pointerCodecOfFunction · 0.85

Calls 4

encodeMethod · 0.80
hasMethod · 0.45
withMethod · 0.45
withoutMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…