| Index: src/utils.cc
|
| ===================================================================
|
| --- src/utils.cc (revision 1142)
|
| +++ src/utils.cc (working copy)
|
| @@ -182,8 +182,9 @@
|
| }
|
|
|
|
|
| -char* ReadChars(const char* filename, int* size, bool verbose) {
|
| - return ReadCharsFromFile(filename, size, 0, verbose);
|
| +byte* ReadBytes(const char* filename, int* size, bool verbose) {
|
| + char* chars = ReadCharsFromFile(filename, size, 0, verbose);
|
| + return reinterpret_cast<byte*>(chars);
|
| }
|
|
|
|
|
| @@ -233,6 +234,15 @@
|
| }
|
|
|
|
|
| +int WriteBytes(const char* filename,
|
| + const byte* bytes,
|
| + int size,
|
| + bool verbose) {
|
| + const char* str = reinterpret_cast<const char*>(bytes);
|
| + return WriteChars(filename, str, size, verbose);
|
| +}
|
| +
|
| +
|
| StringBuilder::StringBuilder(int size) {
|
| buffer_ = Vector<char>::New(size);
|
| position_ = 0;
|
|
|