Works around a VC bug by avoiding defining a function named strdup().

This commit is contained in:
zhanyong.wan
2009-03-26 21:11:22 +00:00
parent 3c7bbf5b46
commit e120fc5890
3 changed files with 12 additions and 7 deletions

View File

@@ -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);