Revision: 6816
Author: [email protected]
Date: Wed Feb 16 05:24:40 2011
Log: Speculative fix for win64 build breakage.

strstr returns a pointer and we are using an int to store a pointer difference. Using intptr_t instead.

Review URL: http://codereview.chromium.org/6529049
http://code.google.com/p/v8/source/detail?r=6816

Modified:
 /branches/bleeding_edge/test/cctest/test-parsing.cc

=======================================
--- /branches/bleeding_edge/test/cctest/test-parsing.cc Fri Jan 7 04:35:42 2011 +++ /branches/bleeding_edge/test/cctest/test-parsing.cc Wed Feb 16 05:24:40 2011
@@ -321,14 +321,15 @@

   data->Initialize();

-  int first_function = strstr(program, "function") - program;
-  int first_lbrace = first_function + strlen("function () ");
+  intptr_t first_function = strstr(program, "function") - program;
+  intptr_t first_lbrace = first_function + strlen("function () ");
   CHECK_EQ('{', program[first_lbrace]);
   i::FunctionEntry entry1 = data->GetFunctionEntry(first_lbrace);
   CHECK(!entry1.is_valid());

- int second_function = strstr(program + first_lbrace, "function") - program;
-  int second_lbrace = second_function + strlen("function () ");
+  intptr_t second_function =
+      strstr(program + first_lbrace, "function") - program;
+  intptr_t second_lbrace = second_function + strlen("function () ");
   CHECK_EQ('{', program[second_lbrace]);
   i::FunctionEntry entry2 = data->GetFunctionEntry(second_lbrace);
   CHECK(entry2.is_valid());

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

Reply via email to