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

Function pointerSizeFuncOf

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

Source from the content-addressed store, hash-verified

17}
18
19func pointerSizeFuncOf(t reflect.Type, c *codec) sizeFunc {
20 return func(p unsafe.Pointer, flags flags) int {
21 if p != nil {
22 if !flags.has(inline) {
23 p = *(*unsafe.Pointer)(p)
24 }
25 return c.size(p, flags.without(inline).with(wantzero))
26 }
27 return 0
28 }
29}
30
31func pointerEncodeFuncOf(t reflect.Type, c *codec) encodeFunc {
32 return func(b []byte, p unsafe.Pointer, flags flags) (int, error) {

Callers 1

pointerCodecOfFunction · 0.85

Calls 3

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…