go:noinline
(ctx *ReadContext, bitmap byte)
| 827 | |
| 828 | //go:noinline |
| 829 | func readHeaderSlow(ctx *ReadContext, bitmap byte) { |
| 830 | if bitmap&^headerFlagMask != 0 { |
| 831 | ctx.SetError(DeserializationErrorf("unsupported root header bitmap 0x%02x", bitmap)) |
| 832 | return |
| 833 | } |
| 834 | if ((bitmap & XLangFlag) != 0) != ctx.xlang { |
| 835 | ctx.SetError(DeserializationErrorf("header bitmap mismatch at xlang bit")) |
| 836 | return |
| 837 | } |
| 838 | if (bitmap&OutOfBandFlag) != 0 && ctx.outOfBandBuffers == nil { |
| 839 | ctx.SetError(DeserializationErrorf("out-of-band buffers are required by root header")) |
| 840 | return |
| 841 | } |
| 842 | } |
| 843 | |
| 844 | // ============================================================================ |
| 845 | // Generic Serialization API |
no test coverage detected