From 4235110a8232bd1c1c4064711164cc7b55e7c466 Mon Sep 17 00:00:00 2001 From: "ager@chromium.org" Date: Wed, 16 Feb 2011 13:24:40 +0000 Subject: [PATCH] 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 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- test/cctest/test-parsing.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc index 151cf50..eadcaed 100755 --- a/test/cctest/test-parsing.cc +++ b/test/cctest/test-parsing.cc @@ -321,14 +321,15 @@ TEST(Regress928) { 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()); -- 2.7.4