(b []byte, p unsafe.Pointer)
| 97 | } |
| 98 | |
| 99 | func (d decoder) decodeInt32(b []byte, p unsafe.Pointer) ([]byte, error) { |
| 100 | if hasNullPrefix(b) { |
| 101 | return b[4:], nil |
| 102 | } |
| 103 | |
| 104 | v, r, err := d.parseInt(b, int32Type) |
| 105 | if err != nil { |
| 106 | return r, err |
| 107 | } |
| 108 | |
| 109 | if v < math.MinInt32 || v > math.MaxInt32 { |
| 110 | return r, unmarshalOverflow(b[:len(b)-len(r)], int32Type) |
| 111 | } |
| 112 | |
| 113 | *(*int32)(p) = int32(v) |
| 114 | return r, nil |
| 115 | } |
| 116 | |
| 117 | func (d decoder) decodeInt64(b []byte, p unsafe.Pointer) ([]byte, error) { |
| 118 | if hasNullPrefix(b) { |
nothing calls this directly
no test coverage detected