Commit 9aaa8d98 authored by lrn@chromium.org's avatar lrn@chromium.org

Builds on Windows too.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@894 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 2cfdd7f5
...@@ -1383,13 +1383,14 @@ int Runtime::StringMatch(Handle<String> sub, ...@@ -1383,13 +1383,14 @@ int Runtime::StringMatch(Handle<String> sub,
} }
Vector<const char> ascii_vector = Vector<const char> ascii_vector =
sub->ToAsciiVector().SubVector(start_index, subject_length); sub->ToAsciiVector().SubVector(start_index, subject_length);
void* pos = memchr(ascii_vector.start(), const void* pos = memchr(ascii_vector.start(),
static_cast<const char>(pchar), static_cast<const char>(pchar),
static_cast<size_t>(ascii_vector.length())); static_cast<size_t>(ascii_vector.length()));
if (pos == NULL) { if (pos == NULL) {
return -1; return -1;
} }
return reinterpret_cast<char*>(pos) - ascii_vector.start() + start_index; return reinterpret_cast<const char*>(pos) - ascii_vector.start()
+ start_index;
} }
return SingleCharIndexOf(sub->ToUC16Vector(), return SingleCharIndexOf(sub->ToUC16Vector(),
pat->Get(pat_shape, 0), pat->Get(pat_shape, 0),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment