From 42f43b7686038e4cbca16d8d2118b139544e6de3 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 13 Apr 2008 03:35:00 -0400 Subject: Check in all changes made so far toward 3.0. --- mask.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'mask.cc') diff --git a/mask.cc b/mask.cc index 972b24ce..7a7a1fc3 100644 --- a/mask.cc +++ b/mask.cc @@ -1,3 +1,6 @@ +#ifdef USE_PCH +#include "pch.h" +#else #include "mask.h" #include "debug.h" #include "util.h" @@ -5,9 +8,12 @@ #include #include +#endif mask_t::mask_t(const std::string& pat) : exclude(false) { + TRACE_CTOR("mask_t(const std::string&)"); + const char * p = pat.c_str(); if (*p == '-') { exclude = true; @@ -33,6 +39,8 @@ mask_t::mask_t(const std::string& pat) : exclude(false) mask_t::mask_t(const mask_t& m) : exclude(m.exclude), pattern(m.pattern) { + TRACE_CTOR("mask_t(copy)"); + const char *error; int erroffset; regexp = pcre_compile(pattern.c_str(), PCRE_CASELESS, @@ -41,7 +49,9 @@ mask_t::mask_t(const mask_t& m) : exclude(m.exclude), pattern(m.pattern) } mask_t::~mask_t() { - pcre_free((pcre *)regexp); + TRACE_DTOR("mask_t"); + if (regexp) + pcre_free((pcre *)regexp); } bool mask_t::match(const std::string& str) const -- cgit v1.2.3