re2: pass Mutex by pointer in MutexLock usage (fixes #628) - #657
Closed
jdymitarai wants to merge 1 commit into
Closed
re2: pass Mutex by pointer in MutexLock usage (fixes #628)#657jdymitarai wants to merge 1 commit into
jdymitarai wants to merge 1 commit into
Conversation
Revert commit 972a15ce9aa71e98fec1fc4a10e8eac9fa3bcf24 ("re2: remove unnecessary & in MutexLock usage").
vcpkg and other packaging systems use Abseil LTS (such as 20250127), which only provides the pointer-based MutexLock(Mutex*) constructor. Passing Mutex by reference causes MSVC compilation failure with error C2665.
Passing by pointer is also consistent with re2/regexp.cc.
Fixes google#628.
Author
|
Closing this PR to avoid review overhead on the team. The context remains in the thread for future reference if helpful. Thanks for your time. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Revert commit 972a15ce9aa71e98fec1fc4a10e8eac9fa3bcf24 ("re2: remove unnecessary & in MutexLock usage").
vcpkg and other package managers currently ship Abseil LTS (such as
20250127), which only provides the pointer-based constructorexplicit MutexLock(Mutex* mu). PassingMutexby reference causes MSVC compilation failure witherror C2665: 'absl::...::MutexLock::MutexLock': no overloaded function could convert all the argument typeswhen building with CMake/vcpkg on Windows.Passing by pointer is also consistent with
re2/regexp.cc.Fixes #628.