| 378 | } |
| 379 | |
| 380 | int32_t BStream_readTaggedInt32(BStream *self) { |
| 381 | unsigned char c = BStream_readByte(self); |
| 382 | BStreamTag t = BStreamTag_FromUnsignedChar(c); |
| 383 | |
| 384 | if (t.type == BSTREAM_UNSIGNED_INT && t.byteCount == 1) { |
| 385 | return (int32_t)BStream_readUint8(self); |
| 386 | } |
| 387 | |
| 388 | if (t.type == BSTREAM_SIGNED_INT && t.byteCount == 4) { |
| 389 | return (int32_t)BStream_readInt32(self); |
| 390 | } |
| 391 | /* |
| 392 | if (t.type == BSTREAM_SIGNED_INT && t.byteCount == 8) |
| 393 | { |
| 394 | return (int32_t)BStream_readInt64(self); |
| 395 | } |
| 396 | */ |
| 397 | |
| 398 | BStream_error_(self, "unhandled int type/size combination"); |
| 399 | |
| 400 | return 0; |
| 401 | } |
| 402 | |
| 403 | intptr_t BStream_readTaggedPointer(BStream *self) { |
| 404 | unsigned char c = BStream_readByte(self); |
no test coverage detected