Skip to content

Commit 2ea13b9

Browse files
Merge pull request #479 from MichaelSB/fix_http_parser_includes
move includes outside namespace crow
2 parents 8d7e53d + cde0e67 commit 2ea13b9

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

include/crow/http_parser_merged.h

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@
1313

1414
// clang-format off
1515
#pragma once
16-
#include "crow/common.h"
17-
namespace crow
18-
{
1916
extern "C" {
20-
2117
#include <stddef.h>
2218
#if defined(_WIN32) && !defined(__MINGW32__) && \
2319
(!defined(_MSC_VER) || _MSC_VER<1600) && !defined(__WINE__)
@@ -35,9 +31,15 @@ typedef unsigned __int64 uint64_t;
3531
#else
3632
#include <stdint.h>
3733
#endif
34+
#include <assert.h>
35+
#include <ctype.h>
36+
#include <string.h>
37+
#include <limits.h>
38+
}
3839

39-
40-
40+
#include "crow/common.h"
41+
namespace crow
42+
{
4143
/* Maximium header size allowed. If the macro is not defined
4244
* before including this header then the default is used. To
4345
* change the maximum header size, define the macro in the build
@@ -188,12 +190,6 @@ enum http_errno {
188190

189191

190192
// SOURCE (.c) CODE
191-
#include <assert.h>
192-
#include <stddef.h>
193-
#include <ctype.h>
194-
#include <string.h>
195-
#include <limits.h>
196-
197193
static uint32_t max_header_size = CROW_HTTP_MAX_HEADER_SIZE;
198194

199195
#ifndef CROW_ULLONG_MAX
@@ -2011,7 +2007,6 @@ http_parser_set_max_header_size(uint32_t size) {
20112007
#undef CROW_STRICT_CHECK
20122008
#undef CROW_NEW_MESSAGE
20132009

2014-
}
20152010
}
20162011

20172012
// clang-format on

0 commit comments

Comments
 (0)