mirror of
https://git.proxmox.com/git/libgit2
synced 2025-12-29 13:18:20 +00:00
Bitfields suck. And if you make them with non-int types, they suck in a non-standards compliant way. Like sucking sideways or something. This commit removes all bitfields in the `http_parser` struct, and replaces them with the minimal type needed to contain their values. Note that the fields in the struct have been reordered so they can be packed with 4-byte alignment. This saves both memory on the parser (because non-int bitfields get expanded to 4byte in most compilers anyway) and time (because the fields are now properly aligned and the compiler doesn't need to generate bit-level ops to access them). |
||
|---|---|---|
| .. | ||
| http-parser | ||
| zlib | ||