summaryrefslogtreecommitdiff
path: root/debug.cc
diff options
context:
space:
mode:
Diffstat (limited to 'debug.cc')
-rw-r--r--debug.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/debug.cc b/debug.cc
index b3b140bc..3b996045 100644
--- a/debug.cc
+++ b/debug.cc
@@ -81,13 +81,8 @@ bool _free_debug_stream = false;
bool _debug_active(const char * const cls) {
if (char * debug = std::getenv("DEBUG_CLASS")) {
- static const char * error;
- static int erroffset;
- static int ovec[30];
- static pcre * class_regexp = pcre_compile(debug, PCRE_CASELESS,
- &error, &erroffset, NULL);
- return pcre_exec(class_regexp, NULL, cls, std::strlen(cls),
- 0, 0, ovec, 30) >= 0;
+ static boost::regex class_regexp(debug);
+ return boost::regex_match(cls, class_regexp);
}
return false;
}