diff options
author | Arun Banala <arun.banala@mongodb.com> | 2019-04-23 11:55:37 +0100 |
---|---|---|
committer | Arun Banala <arun.banala@mongodb.com> | 2019-04-23 11:55:37 +0100 |
commit | 0e367bc76f23d6d876caa00a47700b3634402817 (patch) | |
tree | 4216a36e153131945f9f59b619bdffb53896c076 /src/mongo/db/pipeline/expression.cpp | |
parent | a60f6a53734fa3a022e9ba39bbdab95608ba9108 (diff) | |
download | mongo-0e367bc76f23d6d876caa00a47700b3634402817.tar.gz |
SERVER-40083 Rename 'pcre' variable to fix compile issue becase of typedef conflict
Diffstat (limited to 'src/mongo/db/pipeline/expression.cpp')
-rw-r--r-- | src/mongo/db/pipeline/expression.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/pipeline/expression.cpp b/src/mongo/db/pipeline/expression.cpp index 8b6b00739e4..ec0a0d8f435 100644 --- a/src/mongo/db/pipeline/expression.cpp +++ b/src/mongo/db/pipeline/expression.cpp @@ -5747,9 +5747,9 @@ RegexMatchHandler::RegexExecutionState RegexMatchHandler::buildInitialState( int RegexMatchHandler::execute(RegexExecutionState* regexState) const { invariant(regexState); invariant(!regexState->nullish()); - invariant(regexState->pcre); + invariant(regexState->pcrePtr); - int execResult = pcre_exec(regexState->pcre.get(), + int execResult = pcre_exec(regexState->pcrePtr.get(), 0, regexState->input->c_str(), regexState->input->size(), @@ -5829,15 +5829,15 @@ void RegexMatchHandler::_compile(RegexExecutionState* executionState) const { // The C++ interface pcreccp.h doesn't have a way to capture the matched string (or the index of // the match). So we are using the C interface. First we compile all the regex options to // generate pcre object, which will later be used to match against the input string. - executionState->pcre = std::shared_ptr<pcre>( + executionState->pcrePtr = std::shared_ptr<pcre>( pcre_compile( executionState->pattern->c_str(), pcreOptions, &compile_error, &eoffset, nullptr), pcre_free); - uassert(51111, str::stream() << "Invalid Regex: " << compile_error, executionState->pcre); + uassert(51111, str::stream() << "Invalid Regex: " << compile_error, executionState->pcrePtr); // Calculate the number of capture groups present in 'pattern' and store in 'numCaptures'. const int pcre_retval = pcre_fullinfo( - executionState->pcre.get(), NULL, PCRE_INFO_CAPTURECOUNT, &executionState->numCaptures); + executionState->pcrePtr.get(), NULL, PCRE_INFO_CAPTURECOUNT, &executionState->numCaptures); invariant(pcre_retval == 0); // The first two-thirds of the vector is used to pass back captured substrings' start and |