summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2011-09-28 23:54:09 +0200
committerCarlos Martín Nieto <carlos@cmartin.tk>2011-09-28 23:54:09 +0200
commit0812caaea54e47e31f07e989c3052c61084e1ece (patch)
treecfd8e729759875a86bd2ee81f63232ff55cd88e2 /deps
parent5888860d2aae70914ec150bfdb82c8d7e0149ebb (diff)
downloadlibgit2-0812caaea54e47e31f07e989c3052c61084e1ece.tar.gz
Resync with upstream http-parser
Diffstat (limited to 'deps')
-rw-r--r--deps/http-parser/http_parser.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/deps/http-parser/http_parser.h b/deps/http-parser/http_parser.h
index 830fcd24f..69f67eb2b 100644
--- a/deps/http-parser/http_parser.h
+++ b/deps/http-parser/http_parser.h
@@ -201,29 +201,28 @@ enum http_errno {
struct http_parser {
/** PRIVATE **/
- size_t nread;
- int64_t content_length;
-
- unsigned char type;
- unsigned char flags; /* F_* values from 'flags' enum; semi-public */
+ unsigned char type : 2;
+ unsigned char flags : 6; /* F_* values from 'flags' enum; semi-public */
unsigned char state;
unsigned char header_state;
unsigned char index;
+ size_t nread;
+ int64_t content_length;
+
/** READ-ONLY **/
+ unsigned short http_major;
+ unsigned short http_minor;
+ unsigned short status_code; /* responses only */
+ unsigned char method; /* requests only */
+ unsigned char http_errno : 7;
/* 1 = Upgrade header was present and the parser has exited because of that.
* 0 = No upgrade header present.
* Should be checked when http_parser_execute() returns in addition to
* error checking.
*/
- unsigned char upgrade;
-
- unsigned short http_major;
- unsigned short http_minor;
- unsigned short status_code; /* responses only */
- unsigned char method; /* requests only */
- unsigned char http_errno;
+ unsigned char upgrade : 1;
#if HTTP_PARSER_DEBUG
uint32_t error_lineno;