Commit 60e5d024 authored by olehougaard's avatar olehougaard

Reverting change that made flexo sad.

TBR=ager
Review URL: http://codereview.chromium.org/18150

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1099 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 3291fd4d
...@@ -128,9 +128,9 @@ static int WriteInternalSnapshotToFile(const char* filename, ...@@ -128,9 +128,9 @@ static int WriteInternalSnapshotToFile(const char* filename,
fprintf(f, "namespace v8 {\nnamespace internal {\n\n"); fprintf(f, "namespace v8 {\nnamespace internal {\n\n");
fprintf(f, "const char Snapshot::data_[] = {"); fprintf(f, "const char Snapshot::data_[] = {");
int written = 0; int written = 0;
written += fprintf(f, "0x%x", str[0]); written += fprintf(f, "%i", str[0]);
for (int i = 1; i < size; ++i) { for (int i = 1; i < size; ++i) {
written += fprintf(f, ",0x%x", str[i]); written += fprintf(f, ",%i", str[i]);
// The following is needed to keep the line length low on Visual C++: // The following is needed to keep the line length low on Visual C++:
if (i % 512 == 0) fprintf(f, "\n"); if (i % 512 == 0) fprintf(f, "\n");
} }
......
...@@ -225,8 +225,8 @@ class SnapshotReader { ...@@ -225,8 +225,8 @@ class SnapshotReader {
} }
int GetInt() { int GetInt() {
int result; int result = *reinterpret_cast<const int*>(str_);
GetBytes(reinterpret_cast<byte*>(&result), sizeof(result)); str_ += sizeof(result);
return result; return result;
} }
......
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