Commit Graph

6 Commits

Author SHA1 Message Date
Vicent Marti
dd3fd68266 msvc: Remove superfluous includes 2011-10-05 13:44:27 -07:00
Vicent Marti
72bdfdbc7c http-parser: Disable MSVC warnings locally 2011-09-29 15:25:22 +02:00
Carlos Martín Nieto
0812caaea5 Resync with upstream http-parser 2011-09-28 23:54:09 +02:00
Vicent Marti
d215cf2429 http-parser: More type changes 2011-09-28 20:21:48 +02:00
Vicent Marti
dc5c87812c 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).
2011-09-27 14:59:34 +02:00
Carlos Martín Nieto
b8a8191fed http: add http-parser
The code is under the MIT lincense

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-09-09 13:12:12 +02:00