diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-03-26 21:11:22 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-03-26 21:11:22 +0000 |
commit | 5343de692d0823ba7949d568a74c571c8b63366b (patch) | |
tree | 27d8f2591b60bcafc03f2229fe77bbf517eb513e /src/gtest-port.cc | |
parent | a49bf25b24dd239a9da88e783f037d817a6287b0 (diff) | |
download | gtest-5343de692d0823ba7949d568a74c571c8b63366b.tar.gz gtest-5343de692d0823ba7949d568a74c571c8b63366b.tar.bz2 gtest-5343de692d0823ba7949d568a74c571c8b63366b.tar.xz |
Works around a VC bug by avoiding defining a function named strdup().
git-svn-id: http://googletest.googlecode.com/svn/trunk@228 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'src/gtest-port.cc')
-rw-r--r-- | src/gtest-port.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gtest-port.cc b/src/gtest-port.cc index 0299842..ef21389 100644 --- a/src/gtest-port.cc +++ b/src/gtest-port.cc @@ -98,7 +98,7 @@ bool RE::PartialMatch(const char* str, const RE& re) { // Initializes an RE from its string representation. void RE::Init(const char* regex) { - pattern_ = strdup(regex); + pattern_ = posix::StrDup(regex); // Reserves enough bytes to hold the regular expression used for a // full match. @@ -346,7 +346,7 @@ bool RE::PartialMatch(const char* str, const RE& re) { void RE::Init(const char* regex) { pattern_ = full_pattern_ = NULL; if (regex != NULL) { - pattern_ = posix::strdup(regex); + pattern_ = posix::StrDup(regex); } is_valid_ = ValidateRegex(regex); |