aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/field_mask.pb.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/field_mask.pb.cc')
-rw-r--r--src/google/protobuf/field_mask.pb.cc37
1 files changed, 16 insertions, 21 deletions
diff --git a/src/google/protobuf/field_mask.pb.cc b/src/google/protobuf/field_mask.pb.cc
index 9791b974..8b252996 100644
--- a/src/google/protobuf/field_mask.pb.cc
+++ b/src/google/protobuf/field_mask.pb.cc
@@ -13,10 +13,6 @@
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
-// This is a temporary google only hack
-#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
-#include "third_party/protobuf/version.h"
-#endif
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
@@ -39,7 +35,7 @@ static void InitDefaultsFieldMask_google_2fprotobuf_2ffield_5fmask_2eproto() {
::google::protobuf::FieldMask::InitAsDefaultInstance();
}
-LIBPROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto =
+PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto =
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsFieldMask_google_2fprotobuf_2ffield_5fmask_2eproto}, {}};
void InitDefaults_google_2fprotobuf_2ffield_5fmask_2eproto() {
@@ -50,15 +46,15 @@ void InitDefaults_google_2fprotobuf_2ffield_5fmask_2eproto() {
constexpr ::google::protobuf::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto = nullptr;
constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto = nullptr;
-const ::google::protobuf::uint32 TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+const ::google::protobuf::uint32 TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::FieldMask, _internal_metadata_),
+ PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldMask, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::FieldMask, paths_),
+ PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldMask, paths_),
};
-static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(::google::protobuf::FieldMask)},
};
@@ -179,15 +175,14 @@ const char* FieldMask::_InternalParse(const char* begin, const char* end, void*
while (ptr < end) {
::google::protobuf::uint32 tag;
ptr = Varint::Parse32Inline(ptr, &tag);
- if (!ptr) goto error;
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
switch (tag >> 3) {
- case 0: goto error;
// repeated string paths = 1;
case 1: {
if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual;
do {
ptr = Varint::Parse32Inline(ptr, &size);
- if (!ptr) goto error;
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
ctx->extra_parse_data().SetFieldName("google.protobuf.FieldMask.paths");
parser_till_end = ::google::protobuf::internal::StringParserUTF8;
::std::string* str = msg->add_paths();
@@ -195,16 +190,17 @@ const char* FieldMask::_InternalParse(const char* begin, const char* end, void*
object = str;
if (size > end - ptr) goto len_delim_till_end;
auto newend = ptr + size;
- if (!ctx->ParseExactRange({parser_till_end, object}, ptr, newend)) goto error;
- ptr = newend;
+ if (size) ptr = parser_till_end(ptr, newend, object, ctx);
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend);
if (ptr >= end) break;
- } while((*reinterpret_cast<const ::google::protobuf::uint64*>(ptr) & 255) == 10 && (ptr += 1));
+ } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 10 && (ptr += 1));
break;
}
default: {
handle_unusual: (void)&&handle_unusual;
- if ((tag & 7) == 4) {
- if (!ctx->ValidEndGroup(tag)) goto error;
+ if ((tag & 7) == 4 || tag == 0) {
+ bool ok = ctx->ValidEndGroup(tag);
+ GOOGLE_PROTOBUF_PARSER_ASSERT(ok);
return ptr;
}
auto res = UnknownFieldParse(tag, {_InternalParse, msg},
@@ -215,8 +211,6 @@ const char* FieldMask::_InternalParse(const char* begin, const char* end, void*
} // switch
} // while
return ptr;
-error:
- return nullptr;
len_delim_till_end: (void)&&len_delim_till_end;
return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
{parser_till_end, object}, size);
@@ -228,7 +222,7 @@ group_continues: (void)&&group_continues;
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool FieldMask::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!GOOGLE_PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
+#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.protobuf.FieldMask)
for (;;) {
@@ -426,10 +420,11 @@ void FieldMask::InternalSwap(FieldMask* other) {
} // namespace google
namespace google {
namespace protobuf {
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::FieldMask* Arena::CreateMaybeMessage< ::google::protobuf::FieldMask >(Arena* arena) {
+template<> PROTOBUF_NOINLINE ::google::protobuf::FieldMask* Arena::CreateMaybeMessage< ::google::protobuf::FieldMask >(Arena* arena) {
return Arena::CreateMessageInternal< ::google::protobuf::FieldMask >(arena);
}
} // namespace protobuf
} // namespace google
// @@protoc_insertion_point(global_scope)
+#include <google/protobuf/port_undef.inc>