Works around a VC bug by avoiding defining a function named strdup().
This commit is contained in:
@@ -810,7 +810,7 @@ class Arguments {
|
||||
}
|
||||
}
|
||||
void AddArgument(const char* argument) {
|
||||
args_.insert(args_.end() - 1, strdup(argument));
|
||||
args_.insert(args_.end() - 1, posix::StrDup(argument));
|
||||
}
|
||||
|
||||
template <typename Str>
|
||||
@@ -818,7 +818,7 @@ class Arguments {
|
||||
for (typename ::std::vector<Str>::const_iterator i = arguments.begin();
|
||||
i != arguments.end();
|
||||
++i) {
|
||||
args_.insert(args_.end() - 1, strdup(i->c_str()));
|
||||
args_.insert(args_.end() - 1, posix::StrDup(i->c_str()));
|
||||
}
|
||||
}
|
||||
char* const* Argv() {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user