8000 Merge pull request #57 from fmardini/master · zwxalgorithm/http-parser@f832bf3 · GitHub
[go: up one dir, main page]

Skip to content

Commit f832bf3

Browse files
committed
Merge pull request nodejs#57 from fmardini/master
A struct member rename for compatibility with errno.h
2 parents 31ee648 + 2b2ba2d commit f832bf3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

http_parser.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@
3434
#if HTTP_PARSER_DEBUG
3535
#define SET_ERRNO(e) \
3636
do { \
37-
parser->errno = (e); \
37+
parser->http_errno = (e); \
3838
parser->error_lineno = __LINE__; \
3939
} while (0)
4040
#else
4141
#define SET_ERRNO(e) \
4242
do { \
43-
parser->errno = (e); \
43+
parser->http_errno = (e); \
4444
} while(0)
4545
#endif
4646

@@ -1760,7 +1760,7 @@ http_parser_init (http_parser *parser, enum http_parser_type t)
17601760
parser->upgrade = 0;
17611761
parser->flags = 0;
17621762
parser->method = 0;
1763-
parser->errno = 0;
1763+
parser->http_errno = 0;
17641764
}
17651765

17661766
const char *

http_parser.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ enum http_errno {
189189

190190

191191
/* Get an http_errno value from an http_parser */
192-
#define HTTP_PARSER_ERRNO(p) ((enum http_errno) (p)->errno)
192+
#define HTTP_PARSER_ERRNO(p) ((enum http_errno) (p)->http_errno)
193193

194194
/* Get the line number that generated the current error */
195195
#if HTTP_PARSER_DEBUG
@@ -215,7 +215,7 @@ struct http_parser {
215215
unsigned short http_minor;
216216
unsigned short status_code; /* responses only */
217217
unsigned char method; /* requests only */
218-
unsigned char errno : 7;
218+
unsigned char http_errno : 7;
219219

220220
/* 1 = Upgrade header was present and the parser has exited because of that.
221221
* 0 = No upgrade header present.

0 commit comments

Comments
 (0)
0