Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Side by Side Diff: runtime/platform/json.h

Issue 10383122: Eliminate need for va_copy in json.cc (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/dbg_connection.cc ('k') | runtime/platform/json.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef PLATFORM_JSON_H_ 5 #ifndef PLATFORM_JSON_H_
6 #define PLATFORM_JSON_H_ 6 #define PLATFORM_JSON_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 10
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 111
112 // TextBuffer maintains a dynamic character buffer with a printf-style way to 112 // TextBuffer maintains a dynamic character buffer with a printf-style way to
113 // append text. 113 // append text.
114 class TextBuffer : ValueObject { 114 class TextBuffer : ValueObject {
115 public: 115 public:
116 explicit TextBuffer(intptr_t buf_size); 116 explicit TextBuffer(intptr_t buf_size);
117 ~TextBuffer(); 117 ~TextBuffer();
118 118
119 intptr_t Printf(const char* format, ...); 119 intptr_t Printf(const char* format, ...);
120 intptr_t Printf(const char* format, va_list args);
121 120
122 void Clear(); 121 void Clear();
123 122
124 char* buf() { return buf_; } 123 char* buf() { return buf_; }
125 intptr_t length() { return msg_len_; } 124 intptr_t length() { return msg_len_; }
126 125
127 private: 126 private:
128 void GrowBuffer(intptr_t len); 127 void GrowBuffer(intptr_t len);
129 char* buf_; 128 char* buf_;
130 intptr_t buf_size_; 129 intptr_t buf_size_;
131 intptr_t msg_len_; 130 intptr_t msg_len_;
132 }; 131 };
133 132
134 } // namespace dart 133 } // namespace dart
135 134
136 #endif // PLATFORM_JSON_H_ 135 #endif // PLATFORM_JSON_H_
OLDNEW
« no previous file with comments | « runtime/bin/dbg_connection.cc ('k') | runtime/platform/json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698