aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/util/json_util.h
diff options
context:
space:
mode:
authorGravatar Feng Xiao <xfxyjwf@gmail.com>2017-02-24 15:41:09 -0800
committerGravatar GitHub <noreply@github.com>2017-02-24 15:41:09 -0800
commitb4b0e304be5a68de3d0ee1af9b286f958750f5e4 (patch)
tree5e2d0be798c9dd8edef7056a6e7e126a01ecc588 /src/google/protobuf/util/json_util.h
parent8387b88cdc9f60b6f5e9ab9e1a69de719f3751c1 (diff)
parentbd158fc23849663f1cdb430ddea2dbab9deb336f (diff)
Merge pull request #2355 from xfxyjwf/fixjson
Speed up JSON parsing.
Diffstat (limited to 'src/google/protobuf/util/json_util.h')
-rw-r--r--src/google/protobuf/util/json_util.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/google/protobuf/util/json_util.h b/src/google/protobuf/util/json_util.h
index 8dda70c3..53b1d1ba 100644
--- a/src/google/protobuf/util/json_util.h
+++ b/src/google/protobuf/util/json_util.h
@@ -176,12 +176,15 @@ namespace internal {
class LIBPROTOBUF_EXPORT ZeroCopyStreamByteSink : public strings::ByteSink {
public:
explicit ZeroCopyStreamByteSink(io::ZeroCopyOutputStream* stream)
- : stream_(stream) {}
+ : stream_(stream), buffer_size_(0) {}
+ ~ZeroCopyStreamByteSink();
virtual void Append(const char* bytes, size_t len);
private:
io::ZeroCopyOutputStream* stream_;
+ void* buffer_;
+ int buffer_size_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ZeroCopyStreamByteSink);
};