From 8e03097d9dd34741ddc5c16fb3322dbd22fd0b35 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 13 Jul 2003 11:27:05 +0000 Subject: [PATCH] Added explicit bounds to the array variables to work around Mtrowerks problems. Added extra check before setting dllexport options. [SVN r19095] --- include/boost/regex/config.hpp | 2 +- include/boost/regex/v4/perl_matcher_common.hpp | 2 +- include/boost/regex/v4/perl_matcher_non_recursive.hpp | 4 ++-- include/boost/regex/v4/perl_matcher_recursive.hpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/boost/regex/config.hpp b/include/boost/regex/config.hpp index e2e4497b..e10b416b 100644 --- a/include/boost/regex/config.hpp +++ b/include/boost/regex/config.hpp @@ -209,7 +209,7 @@ using std::distance; # define BOOST_REGEX_HAS_DLL_RUNTIME #endif -#if defined(BOOST_REGEX_HAS_DLL_RUNTIME) && defined(BOOST_REGEX_DYN_LINK) +#if defined(BOOST_REGEX_HAS_DLL_RUNTIME) && defined(BOOST_REGEX_DYN_LINK) && !defined(BOOST_REGEX_STATIC_LINK) # if defined(BOOST_REGEX_SOURCE) # define BOOST_REGEX_DECL __declspec(dllexport) # define BOOST_REGEX_BUILD_DLL diff --git a/include/boost/regex/v4/perl_matcher_common.hpp b/include/boost/regex/v4/perl_matcher_common.hpp index 69f77c21..38e00776 100644 --- a/include/boost/regex/v4/perl_matcher_common.hpp +++ b/include/boost/regex/v4/perl_matcher_common.hpp @@ -145,7 +145,7 @@ bool perl_matcher::match() template bool perl_matcher::find() { - static matcher_proc_type const s_find_vtable[] = + static matcher_proc_type const s_find_vtable[7] = { &perl_matcher::find_restart_any, &perl_matcher::find_restart_word, diff --git a/include/boost/regex/v4/perl_matcher_non_recursive.hpp b/include/boost/regex/v4/perl_matcher_non_recursive.hpp index 97f5112f..fd20fc7f 100644 --- a/include/boost/regex/v4/perl_matcher_non_recursive.hpp +++ b/include/boost/regex/v4/perl_matcher_non_recursive.hpp @@ -117,7 +117,7 @@ struct saved_single_repeat : public saved_state template bool perl_matcher::match_all_states() { - static matcher_proc_type const s_match_vtable[] = + static matcher_proc_type const s_match_vtable[26] = { (&perl_matcher::match_startmark), &perl_matcher::match_endmark, @@ -737,7 +737,7 @@ unwinding does in the recursive implementation. template bool perl_matcher::unwind(bool have_match) { - static unwind_proc_type const s_unwind_table[] = + static unwind_proc_type const s_unwind_table[14] = { &perl_matcher::unwind_end, &perl_matcher::unwind_paren, diff --git a/include/boost/regex/v4/perl_matcher_recursive.hpp b/include/boost/regex/v4/perl_matcher_recursive.hpp index 1d8db606..c51bc701 100644 --- a/include/boost/regex/v4/perl_matcher_recursive.hpp +++ b/include/boost/regex/v4/perl_matcher_recursive.hpp @@ -51,7 +51,7 @@ public: template bool perl_matcher::match_all_states() { - static matcher_proc_type const s_match_vtable[] = + static matcher_proc_type const s_match_vtable[26] = { (&perl_matcher::match_startmark), &perl_matcher::match_endmark,