X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=3rdparty%2Fboost%2Fboost%2Fregex%2Fv4%2Fperl_matcher.hpp;h=a696e5d99b57a2baebd25ff4347a9b0cd34d2034;hb=c40d23deacc277e4a862db803c565ff04e6031f1;hp=32517c62e75750329a1a756bb178c86147ed8c44;hpb=2dc84b69d5a040e6343e21606f1c16a7c0957383;p=features.git diff --git a/3rdparty/boost/boost/regex/v4/perl_matcher.hpp b/3rdparty/boost/boost/regex/v4/perl_matcher.hpp index 32517c62e7..a696e5d99b 100644 --- a/3rdparty/boost/boost/regex/v4/perl_matcher.hpp +++ b/3rdparty/boost/boost/regex/v4/perl_matcher.hpp @@ -122,7 +122,7 @@ inline int string_compare(const Seq& s, const C* p) { ++i; } - return (i == s.size()) ? -p[i] : s[i] - p[i]; + return (i == s.size()) ? -(int)p[i] : (int)s[i] - (int)p[i]; } # define STR_COMP(s,p) string_compare(s,p) @@ -379,6 +379,9 @@ public: : m_result(what), base(first), last(end), position(first), backstop(l_base), re(e), traits_inst(e.get_traits()), m_independent(false), next_count(&rep_obj), rep_obj(&next_count) +#ifdef BOOST_REGEX_NON_RECURSIVE + , m_recursions(0) +#endif { construct_init(e, f); } @@ -547,7 +550,7 @@ private: void push_repeater_count(int i, repeater_count** s); void push_single_repeat(std::size_t c, const re_repeat* r, BidiIterator last_position, int state_id); void push_non_greedy_repeat(const re_syntax_base* ps); - void push_recursion(int idx, const re_syntax_base* p, results_type* presults); + void push_recursion(int idx, const re_syntax_base* p, results_type* presults, results_type* presults2); void push_recursion_pop(); void push_case_change(bool); @@ -566,6 +569,8 @@ private: bool m_unwound_alt; // We are unwinding a commit - used by independent subs to determine whether to stop there or carry on unwinding: //bool m_unwind_commit; + // Recursion limit: + unsigned m_recursions; #endif // these operations aren't allowed, so are declared private,