diff --git a/csharp/src/Google.Protobuf/Reflection/FeatureSetDescriptor.g.cs b/csharp/src/Google.Protobuf/Reflection/FeatureSetDescriptor.g.cs new file mode 100644 index 0000000000..208ce1fcb6 --- /dev/null +++ b/csharp/src/Google.Protobuf/Reflection/FeatureSetDescriptor.g.cs @@ -0,0 +1,17 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +namespace Google.Protobuf.Reflection; + +internal sealed partial class FeatureSetDescriptor +{ + // Canonical serialized form of the edition defaults, generated by embed_edition_defaults. + private const string DefaultsBase64 = + "ChMYhAciACoMCAEQAhgCIAMoATACChMY5wciACoMCAIQARgBIAIoATABChMY6AciDAgBEAEYASACKAEwASoAIOYHKOgH"; +} diff --git a/src/google/protobuf/any.pb.h b/src/google/protobuf/any.pb.h index 1752068f80..3f867f851d 100644 --- a/src/google/protobuf/any.pb.h +++ b/src/google/protobuf/any.pb.h @@ -124,10 +124,7 @@ class PROTOBUF_EXPORT Any final return default_instance().GetMetadata().reflection; } static const Any& default_instance() { - return *internal_default_instance(); - } - static inline const Any* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_Any_default_instance_); } static constexpr int kIndexInFileMessages = 0; diff --git a/src/google/protobuf/api.pb.h b/src/google/protobuf/api.pb.h index bf14193e52..488d4d4eb0 100644 --- a/src/google/protobuf/api.pb.h +++ b/src/google/protobuf/api.pb.h @@ -134,10 +134,7 @@ class PROTOBUF_EXPORT Mixin final return default_instance().GetMetadata().reflection; } static const Mixin& default_instance() { - return *internal_default_instance(); - } - static inline const Mixin* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_Mixin_default_instance_); } static constexpr int kIndexInFileMessages = 2; @@ -351,10 +348,7 @@ class PROTOBUF_EXPORT Method final return default_instance().GetMetadata().reflection; } static const Method& default_instance() { - return *internal_default_instance(); - } - static inline const Method* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_Method_default_instance_); } static constexpr int kIndexInFileMessages = 1; @@ -640,10 +634,7 @@ class PROTOBUF_EXPORT Api final return default_instance().GetMetadata().reflection; } static const Api& default_instance() { - return *internal_default_instance(); - } - static inline const Api* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_Api_default_instance_); } static constexpr int kIndexInFileMessages = 0; diff --git a/src/google/protobuf/duration.pb.h b/src/google/protobuf/duration.pb.h index 90b466233e..1deb7cc939 100644 --- a/src/google/protobuf/duration.pb.h +++ b/src/google/protobuf/duration.pb.h @@ -124,10 +124,7 @@ class PROTOBUF_EXPORT Duration final return default_instance().GetMetadata().reflection; } static const Duration& default_instance() { - return *internal_default_instance(); - } - static inline const Duration* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_Duration_default_instance_); } static constexpr int kIndexInFileMessages = 0; diff --git a/src/google/protobuf/empty.pb.h b/src/google/protobuf/empty.pb.h index 7dd59da6d8..128695f314 100644 --- a/src/google/protobuf/empty.pb.h +++ b/src/google/protobuf/empty.pb.h @@ -124,10 +124,7 @@ class PROTOBUF_EXPORT Empty final return default_instance().GetMetadata().reflection; } static const Empty& default_instance() { - return *internal_default_instance(); - } - static inline const Empty* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_Empty_default_instance_); } static constexpr int kIndexInFileMessages = 0; diff --git a/src/google/protobuf/field_mask.pb.h b/src/google/protobuf/field_mask.pb.h index b6c2024cf8..bced0176dc 100644 --- a/src/google/protobuf/field_mask.pb.h +++ b/src/google/protobuf/field_mask.pb.h @@ -124,10 +124,7 @@ class PROTOBUF_EXPORT FieldMask final return default_instance().GetMetadata().reflection; } static const FieldMask& default_instance() { - return *internal_default_instance(); - } - static inline const FieldMask* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_FieldMask_default_instance_); } static constexpr int kIndexInFileMessages = 0; diff --git a/src/google/protobuf/source_context.pb.h b/src/google/protobuf/source_context.pb.h index 20619ea89e..7fbb1edc7c 100644 --- a/src/google/protobuf/source_context.pb.h +++ b/src/google/protobuf/source_context.pb.h @@ -124,10 +124,7 @@ class PROTOBUF_EXPORT SourceContext final return default_instance().GetMetadata().reflection; } static const SourceContext& default_instance() { - return *internal_default_instance(); - } - static inline const SourceContext* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_SourceContext_default_instance_); } static constexpr int kIndexInFileMessages = 0; diff --git a/src/google/protobuf/struct.pb.h b/src/google/protobuf/struct.pb.h index 1afaebad74..a9a3a8d0d2 100644 --- a/src/google/protobuf/struct.pb.h +++ b/src/google/protobuf/struct.pb.h @@ -181,10 +181,7 @@ class PROTOBUF_EXPORT ListValue final return default_instance().GetMetadata().reflection; } static const ListValue& default_instance() { - return *internal_default_instance(); - } - static inline const ListValue* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_ListValue_default_instance_); } static constexpr int kIndexInFileMessages = 3; @@ -382,10 +379,7 @@ class PROTOBUF_EXPORT Struct final return default_instance().GetMetadata().reflection; } static const Struct& default_instance() { - return *internal_default_instance(); - } - static inline const Struct* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_Struct_default_instance_); } static constexpr int kIndexInFileMessages = 1; @@ -625,7 +619,8 @@ class PROTOBUF_EXPORT Value final return default_instance().GetMetadata().reflection; } static const Value& default_instance() { - return *internal_default_instance(); + return *reinterpret_cast( + &_Value_default_instance_); } enum KindCase { kNullValue = 1, @@ -636,10 +631,6 @@ class PROTOBUF_EXPORT Value final kListValue = 6, KIND_NOT_SET = 0, }; - static inline const Value* internal_default_instance() { - return reinterpret_cast( - &_Value_default_instance_); - } static constexpr int kIndexInFileMessages = 2; friend void swap(Value& a, Value& b) { a.Swap(&b); } inline void Swap(Value* other) { diff --git a/src/google/protobuf/timestamp.pb.h b/src/google/protobuf/timestamp.pb.h index f661142d8e..75a1cae732 100644 --- a/src/google/protobuf/timestamp.pb.h +++ b/src/google/protobuf/timestamp.pb.h @@ -124,10 +124,7 @@ class PROTOBUF_EXPORT Timestamp final return default_instance().GetMetadata().reflection; } static const Timestamp& default_instance() { - return *internal_default_instance(); - } - static inline const Timestamp* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_Timestamp_default_instance_); } static constexpr int kIndexInFileMessages = 0; diff --git a/src/google/protobuf/type.pb.h b/src/google/protobuf/type.pb.h index 74a283ae3b..d94a4a37fd 100644 --- a/src/google/protobuf/type.pb.h +++ b/src/google/protobuf/type.pb.h @@ -286,10 +286,7 @@ class PROTOBUF_EXPORT Option final return default_instance().GetMetadata().reflection; } static const Option& default_instance() { - return *internal_default_instance(); - } - static inline const Option* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_Option_default_instance_); } static constexpr int kIndexInFileMessages = 4; @@ -503,10 +500,7 @@ class PROTOBUF_EXPORT Field final return default_instance().GetMetadata().reflection; } static const Field& default_instance() { - return *internal_default_instance(); - } - static inline const Field* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_Field_default_instance_); } static constexpr int kIndexInFileMessages = 1; @@ -890,10 +884,7 @@ class PROTOBUF_EXPORT EnumValue final return default_instance().GetMetadata().reflection; } static const EnumValue& default_instance() { - return *internal_default_instance(); - } - static inline const EnumValue* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_EnumValue_default_instance_); } static constexpr int kIndexInFileMessages = 3; @@ -1121,10 +1112,7 @@ class PROTOBUF_EXPORT Type final return default_instance().GetMetadata().reflection; } static const Type& default_instance() { - return *internal_default_instance(); - } - static inline const Type* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_Type_default_instance_); } static constexpr int kIndexInFileMessages = 0; @@ -1429,10 +1417,7 @@ class PROTOBUF_EXPORT Enum final return default_instance().GetMetadata().reflection; } static const Enum& default_instance() { - return *internal_default_instance(); - } - static inline const Enum* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_Enum_default_instance_); } static constexpr int kIndexInFileMessages = 2; diff --git a/src/google/protobuf/wrappers.pb.h b/src/google/protobuf/wrappers.pb.h index 898afdfaec..c04b6c656c 100644 --- a/src/google/protobuf/wrappers.pb.h +++ b/src/google/protobuf/wrappers.pb.h @@ -156,10 +156,7 @@ class PROTOBUF_EXPORT UInt64Value final return default_instance().GetMetadata().reflection; } static const UInt64Value& default_instance() { - return *internal_default_instance(); - } - static inline const UInt64Value* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_UInt64Value_default_instance_); } static constexpr int kIndexInFileMessages = 3; @@ -351,10 +348,7 @@ class PROTOBUF_EXPORT UInt32Value final return default_instance().GetMetadata().reflection; } static const UInt32Value& default_instance() { - return *internal_default_instance(); - } - static inline const UInt32Value* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_UInt32Value_default_instance_); } static constexpr int kIndexInFileMessages = 5; @@ -546,10 +540,7 @@ class PROTOBUF_EXPORT StringValue final return default_instance().GetMetadata().reflection; } static const StringValue& default_instance() { - return *internal_default_instance(); - } - static inline const StringValue* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_StringValue_default_instance_); } static constexpr int kIndexInFileMessages = 7; @@ -746,10 +737,7 @@ class PROTOBUF_EXPORT Int64Value final return default_instance().GetMetadata().reflection; } static const Int64Value& default_instance() { - return *internal_default_instance(); - } - static inline const Int64Value* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_Int64Value_default_instance_); } static constexpr int kIndexInFileMessages = 2; @@ -941,10 +929,7 @@ class PROTOBUF_EXPORT Int32Value final return default_instance().GetMetadata().reflection; } static const Int32Value& default_instance() { - return *internal_default_instance(); - } - static inline const Int32Value* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_Int32Value_default_instance_); } static constexpr int kIndexInFileMessages = 4; @@ -1136,10 +1121,7 @@ class PROTOBUF_EXPORT FloatValue final return default_instance().GetMetadata().reflection; } static const FloatValue& default_instance() { - return *internal_default_instance(); - } - static inline const FloatValue* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_FloatValue_default_instance_); } static constexpr int kIndexInFileMessages = 1; @@ -1331,10 +1313,7 @@ class PROTOBUF_EXPORT DoubleValue final return default_instance().GetMetadata().reflection; } static const DoubleValue& default_instance() { - return *internal_default_instance(); - } - static inline const DoubleValue* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_DoubleValue_default_instance_); } static constexpr int kIndexInFileMessages = 0; @@ -1526,10 +1505,7 @@ class PROTOBUF_EXPORT BytesValue final return default_instance().GetMetadata().reflection; } static const BytesValue& default_instance() { - return *internal_default_instance(); - } - static inline const BytesValue* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_BytesValue_default_instance_); } static constexpr int kIndexInFileMessages = 8; @@ -1726,10 +1702,7 @@ class PROTOBUF_EXPORT BoolValue final return default_instance().GetMetadata().reflection; } static const BoolValue& default_instance() { - return *internal_default_instance(); - } - static inline const BoolValue* internal_default_instance() { - return reinterpret_cast( + return *reinterpret_cast( &_BoolValue_default_instance_); } static constexpr int kIndexInFileMessages = 6;