aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/wire_format_lite.h
diff options
context:
space:
mode:
authorGravatar Feng Xiao <xfxyjwf@gmail.com>2015-08-23 17:50:38 -0700
committerGravatar Feng Xiao <xfxyjwf@gmail.com>2015-08-23 17:50:38 -0700
commitb17ec3ca11ed13cc0d984f6d8be112c246b1994d (patch)
treec7c05b5d36fdb3c0a601a4dba0763e1e08f7bc52 /src/google/protobuf/wire_format_lite.h
parenteee38b0c018b3279f77d03dff796f440f40d3516 (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.h10
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);