Merge branch 'master' into rubybuilder

pull/8850/head
Joshua Haberman 3 years ago
commit 275eac2a95
  1. 62
      docs/field_presence.md
  2. 2
      docs/options.md
  3. 2
      src/google/protobuf/any.pb.cc
  4. 4
      src/google/protobuf/any.pb.h
  5. 6
      src/google/protobuf/api.pb.cc
  6. 4
      src/google/protobuf/compiler/cpp/cpp_helpers.h
  7. 2
      src/google/protobuf/compiler/cpp/cpp_message.cc
  8. 8
      src/google/protobuf/compiler/plugin.pb.cc
  9. 54
      src/google/protobuf/descriptor.pb.cc
  10. 2
      src/google/protobuf/duration.pb.cc
  11. 2
      src/google/protobuf/empty.pb.cc
  12. 2
      src/google/protobuf/field_mask.pb.cc
  13. 2
      src/google/protobuf/map_test.cc
  14. 2
      src/google/protobuf/source_context.pb.cc
  15. 6
      src/google/protobuf/struct.pb.cc
  16. 2
      src/google/protobuf/timestamp.pb.cc
  17. 10
      src/google/protobuf/type.pb.cc
  18. 18
      src/google/protobuf/wrappers.pb.cc

@ -66,7 +66,7 @@ Singular fields (of all types) track presence explicitly in the generated API. T
Similar to singular fields, `oneof` fields explicitly track which one of the members, if any, contains a value. For example, consider this example `oneof`:
```
```protobuf
oneof foo {
int32 a = 1;
float b = 2;
@ -144,7 +144,7 @@ This change may or may not be safe, depending on the application's semantics. Fo
Client A uses this definition of the message, which follows the _explicit presence_ serialization discipline for field `foo`:
```
```protobuf
syntax = "proto3";
message Msg {
optional int32 foo = 1;
@ -153,7 +153,7 @@ message Msg {
Client B uses a definition of the same message, except that it follows the _no presence_ discipline:
```
```protobuf
syntax = "proto3";
message Msg {
int32 foo = 1;
@ -162,7 +162,7 @@ message Msg {
Now, consider a scenario where client A observes `foo`'s presence as the clients repeatedly exchange the "same" message by deserializing and reserializing:
```
```protobuf
// Client A:
Msg m_a;
m_a.set_foo(1); // non-default value
@ -208,7 +208,7 @@ These are the general steps to use the experimental field tracking support for p
This is an example of a proto3 message with fields which follow both _no presence_ and _explicit presence_ semantics:
```
```protobuf
syntax = "proto3";
package example;
@ -231,7 +231,7 @@ The generated code for proto3 fields with _explicit presence_ (the `optional` la
This is the definition used in the "no presence" examples below:
```
```protobuf
syntax = "proto3";
package example;
message Msg {
@ -241,7 +241,7 @@ message Msg {
This is the definition used in the "explicit presence" examples below:
```
```protobuf
syntax = "proto3";
package example;
message Msg {
@ -255,7 +255,7 @@ In the examples, a function `GetProto` constructs and returns a message of type
No presence:
```
```C++
Msg m = GetProto();
if (m.foo() != 0) {
// "Clear" the field:
@ -268,7 +268,7 @@ if (m.foo() != 0) {
Explicit presence:
```
```C++
Msg m = GetProto();
if (m.has_foo()) {
// Clear the field:
@ -283,7 +283,7 @@ if (m.has_foo()) {
No presence:
```
```C#
var m = GetProto();
if (m.Foo != 0) {
// "Clear" the field:
@ -296,7 +296,7 @@ if (m.Foo != 0) {
Explicit presence:
```
```C#
var m = GetProto();
if (m.HasFoo) {
// Clear the field:
@ -311,7 +311,7 @@ if (m.HasFoo) {
No presence:
```
```go
m := GetProto()
if m.Foo != 0 {
// "Clear" the field:
@ -324,7 +324,7 @@ if m.Foo != 0 {
Explicit presence:
```
```go
m := GetProto()
if m.Foo != nil {
// Clear the field:
@ -341,7 +341,7 @@ These examples use a `Builder` to demonstrate clearing. Simply checking presence
No presence:
```
```java
Msg.Builder m = GetProto().toBuilder();
if (m.getFoo() != 0) {
// "Clear" the field:
@ -354,7 +354,7 @@ if (m.getFoo() != 0) {
Explicit presence:
```
```java
Msg.Builder m = GetProto().toBuilder();
if (m.hasFoo()) {
// Clear the field:
@ -369,25 +369,25 @@ if (m.hasFoo()) {
No presence:
```
```python
m = example.Msg()
if m.foo != 0:
// "Clear" the field:
# "Clear" the field:
m.foo = 0
else:
// Default value: field may not have been present.
# Default value: field may not have been present.
m.foo = 1
```
Explicit presence:
```
```python
m = example.Msg()
if m.HasField('foo'):
// Clear the field:
# Clear the field:
m.ClearField('foo')
else:
// Field is not present, so set it.
# Field is not present, so set it.
m.foo = 1
```
@ -395,26 +395,26 @@ else:
No presence:
```
```ruby
m = Msg.new
if m.foo != 0
// "Clear" the field:
# "Clear" the field:
m.foo = 0
else
// Default value: field may not have been present.
# Default value: field may not have been present.
m.foo = 1
end
```
Explicit presence:
```
```ruby
m = Msg.new
if m.has_foo?
// Clear the field:
# Clear the field:
m.clear_foo
else
// Field is not present, so set it.
# Field is not present, so set it.
m.foo = 1
end
```
@ -423,7 +423,7 @@ end
No presence:
```
```js
var m = new Msg();
if (m.getFoo() != 0) {
// "Clear" the field:
@ -436,7 +436,7 @@ if (m.getFoo() != 0) {
Explicit presence:
```
```js
var m = new Msg();
if (m.hasFoo()) {
// Clear the field:
@ -451,7 +451,7 @@ if (m.hasFoo()) {
No presence:
```
```Objective-C
Msg *m = [[Msg alloc] init];
if (m.foo != 0) {
// "Clear" the field:
@ -464,7 +464,7 @@ if (m.foo != 0) {
Explicit presence:
```
```Objective-C
Msg *m = [[Msg alloc] init];
if (m.hasFoo()) {
// Clear the field:

@ -206,7 +206,7 @@ with info about your project (name and website) so we can add an entry for you.
* Extensions: 1071
1. protokt
* Website: https://github.com/toasttab/protokt (Currently Private but will be open soon.)
* Website: https://github.com/open-toast/protokt
* Extensions: 1072
1. Dart port of protocol buffers

@ -123,7 +123,7 @@ Any::Any(const Any& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.Any)
}
inline void Any::SharedCtor() {
void Any::SharedCtor() {
type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

@ -129,12 +129,12 @@ class PROTOBUF_EXPORT Any final :
const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor** value_field);
template <typename T, class = typename std::enable_if<!std::is_convertible<T, const ::PROTOBUF_NAMESPACE_ID::Message&>::value>::type>
bool PackFrom(const T& message) {
return _any_metadata_.PackFrom<T>(message);
return _any_metadata_.PackFrom<T>(GetArena(), message);
}
template <typename T, class = typename std::enable_if<!std::is_convertible<T, const ::PROTOBUF_NAMESPACE_ID::Message&>::value>::type>
bool PackFrom(const T& message,
::PROTOBUF_NAMESPACE_ID::ConstStringParam type_url_prefix) {
return _any_metadata_.PackFrom<T>(message, type_url_prefix);}
return _any_metadata_.PackFrom<T>(GetArena(), message, type_url_prefix);}
template <typename T, class = typename std::enable_if<!std::is_convertible<T, const ::PROTOBUF_NAMESPACE_ID::Message&>::value>::type>
bool UnpackTo(T* message) const {
return _any_metadata_.UnpackTo<T>(message);

@ -215,7 +215,7 @@ Api::Api(const Api& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.Api)
}
inline void Api::SharedCtor() {
void Api::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
@ -625,7 +625,7 @@ Method::Method(const Method& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.Method)
}
inline void Method::SharedCtor() {
void Method::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
request_type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
response_type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
@ -1013,7 +1013,7 @@ Mixin::Mixin(const Mixin& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.Mixin)
}
inline void Mixin::SharedCtor() {
void Mixin::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
root_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

@ -356,7 +356,7 @@ inline bool IsEagerlyVerifiedLazy(const FieldDescriptor* field,
}
inline bool IsFieldUsed(const FieldDescriptor* /* field */,
const Options& options) {
const Options& /* options */) {
return true;
}
@ -884,7 +884,7 @@ inline OneOfRangeImpl OneOfRange(const Descriptor* desc) { return {desc}; }
PROTOC_EXPORT std::string StripProto(const std::string& filename);
inline bool EnableMessageOwnedArena(const Descriptor* desc) { return false; }
inline bool EnableMessageOwnedArena(const Descriptor* /* desc */ ) { return false; }
} // namespace cpp
} // namespace compiler

@ -2381,7 +2381,7 @@ std::pair<size_t, size_t> MessageGenerator::GenerateOffsets(
void MessageGenerator::GenerateSharedConstructorCode(io::Printer* printer) {
Formatter format(printer, variables_);
format("inline void $classname$::SharedCtor() {\n");
format("void $classname$::SharedCtor() {\n");
std::vector<bool> processed(optimized_order_.size(), false);
GenerateConstructorBody(printer, processed, false);

@ -254,7 +254,7 @@ Version::Version(const Version& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.Version)
}
inline void Version::SharedCtor() {
void Version::SharedCtor() {
suffix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&major_) - reinterpret_cast<char*>(this)),
@ -583,7 +583,7 @@ CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorRequest)
}
inline void CodeGeneratorRequest::SharedCtor() {
void CodeGeneratorRequest::SharedCtor() {
parameter_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
compiler_version_ = nullptr;
}
@ -939,7 +939,7 @@ CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorRespon
// @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse.File)
}
inline void CodeGeneratorResponse_File::SharedCtor() {
void CodeGeneratorResponse_File::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
insertion_point_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
@ -1282,7 +1282,7 @@ CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse)
}
inline void CodeGeneratorResponse::SharedCtor() {
void CodeGeneratorResponse::SharedCtor() {
error_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
supported_features_ = uint64_t{0u};
}

@ -1255,7 +1255,7 @@ FileDescriptorSet::FileDescriptorSet(const FileDescriptorSet& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorSet)
}
inline void FileDescriptorSet::SharedCtor() {
void FileDescriptorSet::SharedCtor() {
}
FileDescriptorSet::~FileDescriptorSet() {
@ -1510,7 +1510,7 @@ FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorProto)
}
inline void FileDescriptorProto::SharedCtor() {
void FileDescriptorProto::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
syntax_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
@ -2129,7 +2129,7 @@ DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(const DescriptorP
// @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ExtensionRange)
}
inline void DescriptorProto_ExtensionRange::SharedCtor() {
void DescriptorProto_ExtensionRange::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&options_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&end_) -
@ -2407,7 +2407,7 @@ DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(const DescriptorPro
// @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ReservedRange)
}
inline void DescriptorProto_ReservedRange::SharedCtor() {
void DescriptorProto_ReservedRange::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&start_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&end_) -
@ -2680,7 +2680,7 @@ DescriptorProto::DescriptorProto(const DescriptorProto& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto)
}
inline void DescriptorProto::SharedCtor() {
void DescriptorProto::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
options_ = nullptr;
}
@ -3185,7 +3185,7 @@ ExtensionRangeOptions::ExtensionRangeOptions(const ExtensionRangeOptions& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.ExtensionRangeOptions)
}
inline void ExtensionRangeOptions::SharedCtor() {
void ExtensionRangeOptions::SharedCtor() {
}
ExtensionRangeOptions::~ExtensionRangeOptions() {
@ -3466,7 +3466,7 @@ FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.FieldDescriptorProto)
}
inline void FieldDescriptorProto::SharedCtor() {
void FieldDescriptorProto::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
extendee_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
type_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
@ -4055,7 +4055,7 @@ OneofDescriptorProto::OneofDescriptorProto(const OneofDescriptorProto& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.OneofDescriptorProto)
}
inline void OneofDescriptorProto::SharedCtor() {
void OneofDescriptorProto::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
options_ = nullptr;
}
@ -4314,7 +4314,7 @@ EnumDescriptorProto_EnumReservedRange::EnumDescriptorProto_EnumReservedRange(con
// @@protoc_insertion_point(copy_constructor:google.protobuf.EnumDescriptorProto.EnumReservedRange)
}
inline void EnumDescriptorProto_EnumReservedRange::SharedCtor() {
void EnumDescriptorProto_EnumReservedRange::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&start_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&end_) -
@ -4577,7 +4577,7 @@ EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.EnumDescriptorProto)
}
inline void EnumDescriptorProto::SharedCtor() {
void EnumDescriptorProto::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
options_ = nullptr;
}
@ -4950,7 +4950,7 @@ EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProt
// @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueDescriptorProto)
}
inline void EnumValueDescriptorProto::SharedCtor() {
void EnumValueDescriptorProto::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&options_) - reinterpret_cast<char*>(this)),
@ -5257,7 +5257,7 @@ ServiceDescriptorProto::ServiceDescriptorProto(const ServiceDescriptorProto& fro
// @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceDescriptorProto)
}
inline void ServiceDescriptorProto::SharedCtor() {
void ServiceDescriptorProto::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
options_ = nullptr;
}
@ -5584,7 +5584,7 @@ MethodDescriptorProto::MethodDescriptorProto(const MethodDescriptorProto& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.MethodDescriptorProto)
}
inline void MethodDescriptorProto::SharedCtor() {
void MethodDescriptorProto::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
input_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
output_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
@ -6089,7 +6089,7 @@ FileOptions::FileOptions(const FileOptions& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.FileOptions)
}
inline void FileOptions::SharedCtor() {
void FileOptions::SharedCtor() {
java_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
java_outer_classname_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
go_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
@ -7006,7 +7006,7 @@ MessageOptions::MessageOptions(const MessageOptions& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.MessageOptions)
}
inline void MessageOptions::SharedCtor() {
void MessageOptions::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&message_set_wire_format_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&map_entry_) -
@ -7354,7 +7354,7 @@ FieldOptions::FieldOptions(const FieldOptions& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.FieldOptions)
}
inline void FieldOptions::SharedCtor() {
void FieldOptions::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&ctype_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&jstype_) -
@ -7738,7 +7738,7 @@ OneofOptions::OneofOptions(const OneofOptions& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.OneofOptions)
}
inline void OneofOptions::SharedCtor() {
void OneofOptions::SharedCtor() {
}
OneofOptions::~OneofOptions() {
@ -7961,7 +7961,7 @@ EnumOptions::EnumOptions(const EnumOptions& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.EnumOptions)
}
inline void EnumOptions::SharedCtor() {
void EnumOptions::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&allow_alias_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&deprecated_) -
@ -8248,7 +8248,7 @@ EnumValueOptions::EnumValueOptions(const EnumValueOptions& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueOptions)
}
inline void EnumValueOptions::SharedCtor() {
void EnumValueOptions::SharedCtor() {
deprecated_ = false;
}
@ -8497,7 +8497,7 @@ ServiceOptions::ServiceOptions(const ServiceOptions& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceOptions)
}
inline void ServiceOptions::SharedCtor() {
void ServiceOptions::SharedCtor() {
deprecated_ = false;
}
@ -8751,7 +8751,7 @@ MethodOptions::MethodOptions(const MethodOptions& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.MethodOptions)
}
inline void MethodOptions::SharedCtor() {
void MethodOptions::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&deprecated_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&idempotency_level_) -
@ -9054,7 +9054,7 @@ UninterpretedOption_NamePart::UninterpretedOption_NamePart(const UninterpretedOp
// @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption.NamePart)
}
inline void UninterpretedOption_NamePart::SharedCtor() {
void UninterpretedOption_NamePart::SharedCtor() {
name_part_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
is_extension_ = false;
}
@ -9347,7 +9347,7 @@ UninterpretedOption::UninterpretedOption(const UninterpretedOption& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption)
}
inline void UninterpretedOption::SharedCtor() {
void UninterpretedOption::SharedCtor() {
identifier_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
string_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
aggregate_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
@ -9776,7 +9776,7 @@ SourceCodeInfo_Location::SourceCodeInfo_Location(const SourceCodeInfo_Location&
// @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo.Location)
}
inline void SourceCodeInfo_Location::SharedCtor() {
void SourceCodeInfo_Location::SharedCtor() {
leading_comments_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
trailing_comments_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
@ -10143,7 +10143,7 @@ SourceCodeInfo::SourceCodeInfo(const SourceCodeInfo& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo)
}
inline void SourceCodeInfo::SharedCtor() {
void SourceCodeInfo::SharedCtor() {
}
SourceCodeInfo::~SourceCodeInfo() {
@ -10352,7 +10352,7 @@ GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(const GeneratedCodeIn
// @@protoc_insertion_point(copy_constructor:google.protobuf.GeneratedCodeInfo.Annotation)
}
inline void GeneratedCodeInfo_Annotation::SharedCtor() {
void GeneratedCodeInfo_Annotation::SharedCtor() {
source_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&begin_) - reinterpret_cast<char*>(this)),
@ -10666,7 +10666,7 @@ GeneratedCodeInfo::GeneratedCodeInfo(const GeneratedCodeInfo& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.GeneratedCodeInfo)
}
inline void GeneratedCodeInfo::SharedCtor() {
void GeneratedCodeInfo::SharedCtor() {
}
GeneratedCodeInfo::~GeneratedCodeInfo() {

@ -99,7 +99,7 @@ Duration::Duration(const Duration& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.Duration)
}
inline void Duration::SharedCtor() {
void Duration::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&seconds_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&nanos_) -

@ -91,7 +91,7 @@ Empty::Empty(const Empty& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.Empty)
}
inline void Empty::SharedCtor() {
void Empty::SharedCtor() {
}
Empty::~Empty() {

@ -96,7 +96,7 @@ FieldMask::FieldMask(const FieldMask& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.FieldMask)
}
inline void FieldMask::SharedCtor() {
void FieldMask::SharedCtor() {
}
FieldMask::~FieldMask() {

@ -30,7 +30,7 @@
// A hack to include windows.h first, which ensures the GetMessage macro can
// be undefined when we include <google/protobuf/stubs/common.h>
#if defined(_WIN32)
#if defined(_MSC_VER)
#define _WINSOCKAPI_ // to avoid re-definition in WinSock2.h
#define NOMINMAX // to avoid defining min/max macros
#include <windows.h>

@ -99,7 +99,7 @@ SourceContext::SourceContext(const SourceContext& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.SourceContext)
}
inline void SourceContext::SharedCtor() {
void SourceContext::SharedCtor() {
file_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

@ -201,7 +201,7 @@ Struct::Struct(const Struct& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.Struct)
}
inline void Struct::SharedCtor() {
void Struct::SharedCtor() {
}
Struct::~Struct() {
@ -499,7 +499,7 @@ Value::Value(const Value& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.Value)
}
inline void Value::SharedCtor() {
void Value::SharedCtor() {
clear_has_kind();
}
@ -866,7 +866,7 @@ ListValue::ListValue(const ListValue& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.ListValue)
}
inline void ListValue::SharedCtor() {
void ListValue::SharedCtor() {
}
ListValue::~ListValue() {

@ -99,7 +99,7 @@ Timestamp::Timestamp(const Timestamp& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.Timestamp)
}
inline void Timestamp::SharedCtor() {
void Timestamp::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&seconds_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&nanos_) -

@ -380,7 +380,7 @@ Type::Type(const Type& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.Type)
}
inline void Type::SharedCtor() {
void Type::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&source_context_) - reinterpret_cast<char*>(this)),
@ -760,7 +760,7 @@ Field::Field(const Field& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.Field)
}
inline void Field::SharedCtor() {
void Field::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
json_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
@ -1250,7 +1250,7 @@ Enum::Enum(const Enum& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.Enum)
}
inline void Enum::SharedCtor() {
void Enum::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&source_context_) - reinterpret_cast<char*>(this)),
@ -1578,7 +1578,7 @@ EnumValue::EnumValue(const EnumValue& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValue)
}
inline void EnumValue::SharedCtor() {
void EnumValue::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
number_ = 0;
}
@ -1850,7 +1850,7 @@ Option::Option(const Option& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.Option)
}
inline void Option::SharedCtor() {
void Option::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
value_ = nullptr;
}

@ -261,7 +261,7 @@ DoubleValue::DoubleValue(const DoubleValue& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.DoubleValue)
}
inline void DoubleValue::SharedCtor() {
void DoubleValue::SharedCtor() {
value_ = 0;
}
@ -444,7 +444,7 @@ FloatValue::FloatValue(const FloatValue& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.FloatValue)
}
inline void FloatValue::SharedCtor() {
void FloatValue::SharedCtor() {
value_ = 0;
}
@ -627,7 +627,7 @@ Int64Value::Int64Value(const Int64Value& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.Int64Value)
}
inline void Int64Value::SharedCtor() {
void Int64Value::SharedCtor() {
value_ = int64_t{0};
}
@ -812,7 +812,7 @@ UInt64Value::UInt64Value(const UInt64Value& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.UInt64Value)
}
inline void UInt64Value::SharedCtor() {
void UInt64Value::SharedCtor() {
value_ = uint64_t{0u};
}
@ -997,7 +997,7 @@ Int32Value::Int32Value(const Int32Value& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.Int32Value)
}
inline void Int32Value::SharedCtor() {
void Int32Value::SharedCtor() {
value_ = 0;
}
@ -1182,7 +1182,7 @@ UInt32Value::UInt32Value(const UInt32Value& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.UInt32Value)
}
inline void UInt32Value::SharedCtor() {
void UInt32Value::SharedCtor() {
value_ = 0u;
}
@ -1367,7 +1367,7 @@ BoolValue::BoolValue(const BoolValue& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.BoolValue)
}
inline void BoolValue::SharedCtor() {
void BoolValue::SharedCtor() {
value_ = false;
}
@ -1554,7 +1554,7 @@ StringValue::StringValue(const StringValue& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.StringValue)
}
inline void StringValue::SharedCtor() {
void StringValue::SharedCtor() {
value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
@ -1754,7 +1754,7 @@ BytesValue::BytesValue(const BytesValue& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.BytesValue)
}
inline void BytesValue::SharedCtor() {
void BytesValue::SharedCtor() {
value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

Loading…
Cancel
Save