/[pcre]/code/trunk/pcrecpp.cc
ViewVC logotype

Diff of /code/trunk/pcrecpp.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 80 by nigel, Sat Feb 24 21:40:45 2007 UTC revision 81 by nigel, Sat Feb 24 21:40:59 2007 UTC
# Line 36  Line 36 
36  #include <assert.h>  #include <assert.h>
37  #include <errno.h>  #include <errno.h>
38  #include <string>  #include <string>
39    #include <algorithm>
40  #include "config.h"  #include "config.h"
41  // We need this to compile the proper dll on windows/msys.  This is copied  // We need this to compile the proper dll on windows/msys.  This is copied
42  // from pcre_internal.h.  It would probably be better just to include that.  // from pcre_internal.h.  It would probably be better just to include that.
# Line 97  RE::~RE() { Line 98  RE::~RE() {
98  pcre* RE::Compile(Anchor anchor) {  pcre* RE::Compile(Anchor anchor) {
99    // First, convert RE_Options into pcre options    // First, convert RE_Options into pcre options
100    int pcre_options = 0;    int pcre_options = 0;
101    if (options_.utf8())    pcre_options = options_.all_options();
     pcre_options |= PCRE_UTF8;  
102    
103    // Special treatment for anchoring.  This is needed because at    // Special treatment for anchoring.  This is needed because at
104    // runtime pcre only provides an option for anchoring at the    // runtime pcre only provides an option for anchoring at the
# Line 378  bool RE::Extract(const StringPiece& rewr Line 378  bool RE::Extract(const StringPiece& rewr
378    int matches = TryMatch(text, 0, UNANCHORED, vec, kVecSize);    int matches = TryMatch(text, 0, UNANCHORED, vec, kVecSize);
379    if (matches == 0)    if (matches == 0)
380      return false;      return false;
381    out->clear();    out->erase();
382    return Rewrite(out, rewrite, text, vec, matches);    return Rewrite(out, rewrite, text, vec, matches);
383  }  }
384    

Legend:
Removed from v.80  
changed lines
  Added in v.81

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12