• Show log

    Commit

  • Hash : dc5c8781
    Author : Vicent Marti
    Date : 2011-09-27T14:53:57

    http-parser: Do not use bitfields
    
    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).