diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2015-08-23 17:50:38 -0700 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2015-08-23 17:50:38 -0700 |
commit | b17ec3ca11ed13cc0d984f6d8be112c246b1994d (patch) | |
tree | c7c05b5d36fdb3c0a601a4dba0763e1e08f7bc52 /src/google/protobuf/wire_format_lite.h | |
parent | eee38b0c018b3279f77d03dff796f440f40d3516 (diff) |
Down-integrate from internal code base.
Diffstat (limited to 'src/google/protobuf/wire_format_lite.h')
-rw-r--r-- | src/google/protobuf/wire_format_lite.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/google/protobuf/wire_format_lite.h b/src/google/protobuf/wire_format_lite.h index 19fbc2c5..55fc7ecd 100644 --- a/src/google/protobuf/wire_format_lite.h +++ b/src/google/protobuf/wire_format_lite.h @@ -316,6 +316,16 @@ class LIBPROTOBUF_EXPORT WireFormatLite { static bool ReadBytes(input, string** p); + enum Operation { + PARSE = 0, + SERIALIZE = 1, + }; + + // Returns true if the data is valid UTF-8. + static bool VerifyUtf8String(const char* data, int size, + Operation op, + const char* field_name); + static inline bool ReadGroup (field_number, input, MessageLite* value); static inline bool ReadMessage(input, MessageLite* value); |