From 33b6eb06371b0b634bf3f3aa90e427f737e20f03 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sat, 13 Oct 2001 10:19:01 +0000 Subject: [PATCH] Renamed member functions "free" to prevent conflict with system macro. [SVN r11380] --- include/boost/regex.hpp | 12 ++++++------ include/boost/regex/detail/regex_match.hpp | 8 ++++---- include/boost/regex/regex_traits.hpp | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/boost/regex.hpp b/include/boost/regex.hpp index 970adcc7..619e2583 100644 --- a/include/boost/regex.hpp +++ b/include/boost/regex.hpp @@ -890,7 +890,7 @@ protected: // protected contructor for derived class... match_results_base(bool){} - void BOOST_REGEX_CALL free(); + void BOOST_REGEX_CALL m_free(); public: @@ -906,7 +906,7 @@ public: ~match_results_base() { - free(); + m_free(); } size_type BOOST_REGEX_CALL size()const @@ -1096,7 +1096,7 @@ inline match_results_base& BOOST_REGEX_CALL match_results_b { if(ref != m.ref) { - free(); + m_free(); ref = m.ref; ++(ref->count); } @@ -1105,7 +1105,7 @@ inline match_results_base& BOOST_REGEX_CALL match_results_b template -void BOOST_REGEX_CALL match_results_base::free() +void BOOST_REGEX_CALL match_results_base::m_free() { if(--(ref->count) == 0) { @@ -1162,7 +1162,7 @@ void BOOST_REGEX_CALL match_results_base::set_size(size_typ new (p1) sub_match(); ++p1; } - free(); + m_free(); } catch(...) { @@ -1204,7 +1204,7 @@ void BOOST_REGEX_CALL match_results_base::set_size(size_typ new (p1) sub_match(j); ++p1; } - free(); + m_free(); } catch(...) { diff --git a/include/boost/regex/detail/regex_match.hpp b/include/boost/regex/detail/regex_match.hpp index 2f9cfa1c..ef7632cc 100644 --- a/include/boost/regex/detail/regex_match.hpp +++ b/include/boost/regex/detail/regex_match.hpp @@ -163,9 +163,9 @@ public: ~_priv_match_data() { - free(); + m_free(); } - void free(); + void m_free(); void set_accumulator_size(unsigned int size); int* get_accumulators() { @@ -191,7 +191,7 @@ void _priv_match_data::set_accumulator_size(unsigned int si { if(size > caccumulators) { - free(); + m_free(); caccumulators = size; accumulators = i_alloc(temp_match.allocator()).allocate(caccumulators); loop_starts = it_alloc(temp_match.allocator()).allocate(caccumulators); @@ -201,7 +201,7 @@ void _priv_match_data::set_accumulator_size(unsigned int si } template -void _priv_match_data::free() +void _priv_match_data::m_free() { if(caccumulators) { diff --git a/include/boost/regex/regex_traits.hpp b/include/boost/regex/regex_traits.hpp index 5602d5fe..30683ef9 100644 --- a/include/boost/regex/regex_traits.hpp +++ b/include/boost/regex/regex_traits.hpp @@ -239,7 +239,7 @@ public: } ~c_regex_traits() { - free(); + m_free(); } struct sentry { @@ -250,7 +250,7 @@ public: static void BOOST_REGEX_CALL update(); private: static void BOOST_REGEX_CALL init(); - static void BOOST_REGEX_CALL free(); + static void BOOST_REGEX_CALL m_free(); static c_regex_traits i; static unsigned sort_type; @@ -307,7 +307,7 @@ public: c_regex_traits() { init(); } ~c_regex_traits() - { free(); } + { m_free(); } struct sentry { sentry(const c_regex_traits&) @@ -319,7 +319,7 @@ public: static unsigned int BOOST_REGEX_CALL strwiden(wchar_t *s1, unsigned int len, const char *s2); private: static bool BOOST_REGEX_CALL do_iswclass(wchar_t c, boost::uint_fast32_t f); - static void BOOST_REGEX_CALL free(); + static void BOOST_REGEX_CALL m_free(); static void BOOST_REGEX_CALL init(); static bool BOOST_REGEX_CALL do_lookup_collate(std::basic_string& out, const wchar_t* first, const wchar_t* last); static c_regex_traits init_;