| Index: runtime/platform/json.cc
|
| diff --git a/runtime/platform/json.cc b/runtime/platform/json.cc
|
| index 31ad4188f7162196125c79c97d1613182a85a0b3..a406e7a5728bf96303387fbaa070c0e2af6f55a0 100644
|
| --- a/runtime/platform/json.cc
|
| +++ b/runtime/platform/json.cc
|
| @@ -510,6 +510,15 @@ void TextBuffer::Clear() {
|
| }
|
|
|
|
|
| +const char* TextBuffer::Steal() {
|
| + const char* r = buf_;
|
| + buf_ = NULL;
|
| + buf_size_ = 0;
|
| + msg_len_ = 0;
|
| + return r;
|
| +}
|
| +
|
| +
|
| void TextBuffer::AddChar(char ch) {
|
| EnsureCapacity(sizeof(ch));
|
| buf_[msg_len_] = ch;
|
|
|