From 60e5d024ef91ead2f263e4e0f1949c38785cdbae Mon Sep 17 00:00:00 2001 From: olehougaard Date: Fri, 16 Jan 2009 14:53:36 +0000 Subject: [PATCH] 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 --- src/mksnapshot.cc | 4 ++-- src/serialize.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mksnapshot.cc b/src/mksnapshot.cc index 24f244d..441ae18 100644 --- a/src/mksnapshot.cc +++ b/src/mksnapshot.cc @@ -128,9 +128,9 @@ static int WriteInternalSnapshotToFile(const char* filename, fprintf(f, "namespace v8 {\nnamespace internal {\n\n"); fprintf(f, "const char Snapshot::data_[] = {"); int written = 0; - written += fprintf(f, "0x%x", str[0]); + written += fprintf(f, "%i", str[0]); 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++: if (i % 512 == 0) fprintf(f, "\n"); } diff --git a/src/serialize.h b/src/serialize.h index 45d1edf..0679ecc 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -225,8 +225,8 @@ class SnapshotReader { } int GetInt() { - int result; - GetBytes(reinterpret_cast(&result), sizeof(result)); + int result = *reinterpret_cast(str_); + str_ += sizeof(result); return result; } -- 2.7.4