(ctx *ReadContext, value reflect.Value)
| 663 | } |
| 664 | |
| 665 | func (s uint32ArraySerializer) ReadData(ctx *ReadContext, value reflect.Value) { |
| 666 | buf := ctx.Buffer() |
| 667 | err := ctx.Err() |
| 668 | size := ctx.ReadBinaryLength() |
| 669 | length, ok := checkWireArraySize(ctx, size, 4, value) |
| 670 | if !ok { |
| 671 | return |
| 672 | } |
| 673 | if length > 0 { |
| 674 | if isLittleEndian { |
| 675 | ptr := value.Addr().UnsafePointer() |
| 676 | buf.Read(unsafe.Slice((*byte)(ptr), size)) |
| 677 | } else { |
| 678 | for i := 0; i < length; i++ { |
| 679 | value.Index(i).SetUint(uint64(uint32(buf.ReadInt32(err)))) |
| 680 | } |
| 681 | } |
| 682 | } |
| 683 | } |
| 684 | |
| 685 | func (s uint32ArraySerializer) Read(ctx *ReadContext, refMode RefMode, readType bool, hasGenerics bool, value reflect.Value) { |
| 686 | done := readArrayRefAndType(ctx, refMode, readType, value) |
no test coverage detected