Skip to content

Commit 6bdf99d

Browse files
committed
Remove unnecessary limit on JSON parsing depth on Apple.
1 parent ae63e64 commit 6bdf99d

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

Release/src/json/json_parsing.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,7 @@ class JSON_Parser
189189
const typename std::char_traits<CharType>::int_type m_eof;
190190
size_t m_currentColumn;
191191
size_t m_currentParsingDepth;
192-
#ifndef __APPLE__
193192
static const size_t maxParsingDepth = 128;
194-
#else
195-
static const size_t maxParsingDepth = 32;
196-
#endif
197193
};
198194

199195
template <typename CharType>

Release/tests/Functional/json/parsing_tests.cpp

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -490,21 +490,12 @@ utility::string_t make_deep_json_string(size_t depth)
490490

491491
TEST(deeply_nested)
492492
{
493-
#ifdef __APPLE__
494-
auto strGood = make_deep_json_string(32);
495-
#else
496-
auto strGood = make_deep_json_string(128);
497-
#endif
498493
// This should parse without issues:
494+
auto strGood = make_deep_json_string(128);
499495
json::value::parse(strGood);
500496

501-
#ifdef __APPLE__
502-
auto strBad = make_deep_json_string(33);
503-
#else
504-
auto strBad = make_deep_json_string(129);
505-
#endif
506-
507497
// But this one should throw:
498+
auto strBad = make_deep_json_string(129);
508499
VERIFY_PARSING_THROW(json::value::parse(strBad));
509500
}
510501

0 commit comments

Comments
 (0)