Index: third_party/protobuf/src/google/protobuf/stubs/strutil.h |
diff --git a/third_party/protobuf/src/google/protobuf/stubs/strutil.h b/third_party/protobuf/src/google/protobuf/stubs/strutil.h |
index 27d475754ae735ef7205a8e0b48601baaaca607b..8bdd611030ff4bc6ef95bc2855ae6727a94b2400 100644 |
--- a/third_party/protobuf/src/google/protobuf/stubs/strutil.h |
+++ b/third_party/protobuf/src/google/protobuf/stubs/strutil.h |
@@ -648,6 +648,9 @@ struct LIBPROTOBUF_EXPORT AlphaNum { |
AlphaNum(StringPiece str) |
: piece_data_(str.data()), piece_size_(str.size()) {} |
+ AlphaNum(internal::StringPiecePod str) |
+ : piece_data_(str.data()), piece_size_(str.size()) {} |
+ |
size_t size() const { return piece_size_; } |
const char *data() const { return piece_data_; } |
@@ -847,6 +850,11 @@ LIBPROTOBUF_EXPORT void Base64Escape(const unsigned char* src, int szsrc, |
LIBPROTOBUF_EXPORT void WebSafeBase64Escape(const unsigned char* src, int szsrc, |
string* dest, bool do_padding); |
+inline bool IsValidCodePoint(uint32 code_point) { |
+ return code_point < 0xD800 || |
+ (code_point >= 0xE000 && code_point <= 0x10FFFF); |
+} |
+ |
static const int UTFmax = 4; |
// ---------------------------------------------------------------------- |
// EncodeAsUTF8Char() |