From 0a6b5726ec3bf402a953ea8a03b98ecbf4b90b0c Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 19 Apr 2007 20:31:46 +0000 Subject: Made the amount/balance/value interface a bit more rational; added back a useless version of the register command (just to prove the command sequence); and added smart XML semantics to the XPath implementation so that nodes can be coerced to values. --- debug.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'debug.cc') 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; } -- cgit v1.2.3