]> git.lyx.org Git - features.git/blobdiff - 3rdparty/boost/boost/regex/v4/perl_matcher.hpp
Update to boost 1.68
[features.git] / 3rdparty / boost / boost / regex / v4 / perl_matcher.hpp
index 32517c62e75750329a1a756bb178c86147ed8c44..a696e5d99b57a2baebd25ff4347a9b0cd34d2034 100644 (file)
@@ -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<BidiIterator>** 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,