Reviewers: Mads Ager,

Description:
Fix windows build.

On windows memchr returns const void* instead of void*.

Please review this at http://codereview.chromium.org/1074003

Affected files:
  M src/runtime.cc


Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 559bcd385765e2c5e37a1db8a82e11e7d7be03d5..1ad5004532127b8b3e795d6fd68182ad397ba9ea 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -2354,7 +2354,7 @@ static inline int SingleCharIndexOf(Vector<const schar> string,
                                     schar pattern_char,
                                     int start_index) {
   if (sizeof(schar) == 1) {
-    schar* pos = reinterpret_cast<schar*>(
+    const schar* pos = reinterpret_cast<const schar*>(
         memchr(string.start() + start_index,
                pattern_char,
                string.length() - start_index));
@@ -2409,9 +2409,10 @@ static int SimpleIndexOf(Vector<const schar> subject,
       return i;
     }
     if (sizeof(schar) == 1 && sizeof(pchar) == 1) {
-      schar* pos = reinterpret_cast<schar*>(memchr(subject.start() + i,
-                                                   pattern_first_char,
-                                                   n - i + 1));
+      const schar* pos = reinterpret_cast<const schar*>(
+          memchr(subject.start() + i,
+                 pattern_first_char,
+                 n - i + 1));
       if (pos == NULL) {
         *complete = true;
         return -1;


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to