(b []byte, p unsafe.Pointer)
| 79 | } |
| 80 | |
| 81 | func (d decoder) decodeInt16(b []byte, p unsafe.Pointer) ([]byte, error) { |
| 82 | if hasNullPrefix(b) { |
| 83 | return b[4:], nil |
| 84 | } |
| 85 | |
| 86 | v, r, err := d.parseInt(b, int16Type) |
| 87 | if err != nil { |
| 88 | return r, err |
| 89 | } |
| 90 | |
| 91 | if v < math.MinInt16 || v > math.MaxInt16 { |
| 92 | return r, unmarshalOverflow(b[:len(b)-len(r)], int16Type) |
| 93 | } |
| 94 | |
| 95 | *(*int16)(p) = int16(v) |
| 96 | return r, nil |
| 97 | } |
| 98 | |
| 99 | func (d decoder) decodeInt32(b []byte, p unsafe.Pointer) ([]byte, error) { |
| 100 | if hasNullPrefix(b) { |
nothing calls this directly
no test coverage detected