mirror of
https://git.tukaani.org/xz.git
synced 2024-04-04 12:36:23 +02:00
xz: Update a comment in file_io.h.
This commit is contained in:
parent
15b55d5c63
commit
f6d2424534
1 changed files with 4 additions and 1 deletions
|
@ -20,7 +20,10 @@
|
||||||
|
|
||||||
|
|
||||||
/// is_sparse() accesses the buffer as uint64_t for maximum speed.
|
/// is_sparse() accesses the buffer as uint64_t for maximum speed.
|
||||||
/// Use an union to make sure that the buffer is properly aligned.
|
/// The u32 and u64 members must only be access through this union
|
||||||
|
/// to avoid strict aliasing violations. Taking a pointer of u8
|
||||||
|
/// should be fine as long as uint8_t maps to unsigned char which
|
||||||
|
/// can alias anything.
|
||||||
typedef union {
|
typedef union {
|
||||||
uint8_t u8[IO_BUFFER_SIZE];
|
uint8_t u8[IO_BUFFER_SIZE];
|
||||||
uint32_t u32[IO_BUFFER_SIZE / sizeof(uint32_t)];
|
uint32_t u32[IO_BUFFER_SIZE / sizeof(uint32_t)];
|
||||||
|
|
Loading…
Reference in a new issue