Merge pull request #6016 from haon4/201904101300
Down integration to GitHub
diff --git a/csharp/src/Google.Protobuf.Test/testprotos.pb b/csharp/src/Google.Protobuf.Test/testprotos.pb
index 9c68af0..4cac7ba 100644
--- a/csharp/src/Google.Protobuf.Test/testprotos.pb
+++ b/csharp/src/Google.Protobuf.Test/testprotos.pb
Binary files differ
diff --git a/csharp/src/Google.Protobuf/Reflection/Descriptor.cs b/csharp/src/Google.Protobuf/Reflection/Descriptor.cs
index 3cdaaab..6f4b5c5 100644
--- a/csharp/src/Google.Protobuf/Reflection/Descriptor.cs
+++ b/csharp/src/Google.Protobuf/Reflection/Descriptor.cs
@@ -4345,8 +4345,8 @@
private string phpMetadataNamespace_;
/// <summary>
/// Use this option to change the namespace of php generated metadata classes.
- /// Default is empty. When this option is empty, the proto file name will be used
- /// for determining the namespace.
+ /// Default is empty. When this option is empty, the proto file name will be
+ /// used for determining the namespace.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string PhpMetadataNamespace {
diff --git a/php/src/Google/Protobuf/Internal/FileOptions.php b/php/src/Google/Protobuf/Internal/FileOptions.php
index c6b36bb..6fea195 100644
--- a/php/src/Google/Protobuf/Internal/FileOptions.php
+++ b/php/src/Google/Protobuf/Internal/FileOptions.php
@@ -175,8 +175,8 @@
private $has_php_namespace = false;
/**
* Use this option to change the namespace of php generated metadata classes.
- * Default is empty. When this option is empty, the proto file name will be used
- * for determining the namespace.
+ * Default is empty. When this option is empty, the proto file name will be
+ * used for determining the namespace.
*
* Generated from protobuf field <code>optional string php_metadata_namespace = 44;</code>
*/
@@ -280,8 +280,8 @@
* determining the namespace.
* @type string $php_metadata_namespace
* Use this option to change the namespace of php generated metadata classes.
- * Default is empty. When this option is empty, the proto file name will be used
- * for determining the namespace.
+ * Default is empty. When this option is empty, the proto file name will be
+ * used for determining the namespace.
* @type string $ruby_package
* Use this option to change the package of ruby generated classes. Default
* is empty. When this option is not set, the package name will be used for
@@ -938,8 +938,8 @@
/**
* Use this option to change the namespace of php generated metadata classes.
- * Default is empty. When this option is empty, the proto file name will be used
- * for determining the namespace.
+ * Default is empty. When this option is empty, the proto file name will be
+ * used for determining the namespace.
*
* Generated from protobuf field <code>optional string php_metadata_namespace = 44;</code>
* @return string
@@ -951,8 +951,8 @@
/**
* Use this option to change the namespace of php generated metadata classes.
- * Default is empty. When this option is empty, the proto file name will be used
- * for determining the namespace.
+ * Default is empty. When this option is empty, the proto file name will be
+ * used for determining the namespace.
*
* Generated from protobuf field <code>optional string php_metadata_namespace = 44;</code>
* @param string $var
diff --git a/python/google/protobuf/internal/text_format_test.py b/python/google/protobuf/internal/text_format_test.py
index 3b0adcb..8aff950 100755
--- a/python/google/protobuf/internal/text_format_test.py
+++ b/python/google/protobuf/internal/text_format_test.py
@@ -268,13 +268,6 @@
def testPrintFloatFormat(self, message_module):
# Check that float_format argument is passed to sub-message formatting.
message = message_module.NestedTestAllTypes()
- # We use 1.25 as it is a round number in binary. The proto 32-bit float
- # will not gain additional imprecise digits as a 64-bit Python float and
- # show up in its str. 32-bit 1.2 is noisy when extended to 64-bit:
- # >>> struct.unpack('f', struct.pack('f', 1.2))[0]
- # 1.2000000476837158
- # >>> struct.unpack('f', struct.pack('f', 1.25))[0]
- # 1.25
message.payload.optional_float = 1.25
# Check rounding at 15 significant digits
message.payload.optional_double = -.000003456789012345678
@@ -298,6 +291,31 @@
self.RemoveRedundantZeros(text_message),
'payload {{ {0} {1} {2} {3} }}'.format(*formatted_fields))
+ # 32-bit 1.2 is noisy when extended to 64-bit:
+ # >>> struct.unpack('f', struct.pack('f', 1.2))[0]
+ # 1.2000000476837158
+ # TODO(jieluo): change to 1.2 with cl/241634942.
+ message.payload.optional_float = 1.2000000476837158
+ formatted_fields = ['optional_float: 1.2',
+ 'optional_double: -3.45678901234568e-6',
+ 'repeated_float: -5642', 'repeated_double: 7.89e-5']
+ text_message = text_format.MessageToString(message, float_format='.7g',
+ double_format='.15g')
+ self.CompareToGoldenText(
+ self.RemoveRedundantZeros(text_message),
+ 'payload {{\n {0}\n {1}\n {2}\n {3}\n}}\n'.format(
+ *formatted_fields))
+
+ # Test only set float_format affect both float and double fields.
+ formatted_fields = ['optional_float: 1.2',
+ 'optional_double: -3.456789e-6',
+ 'repeated_float: -5642', 'repeated_double: 7.89e-5']
+ text_message = text_format.MessageToString(message, float_format='.7g')
+ self.CompareToGoldenText(
+ self.RemoveRedundantZeros(text_message),
+ 'payload {{\n {0}\n {1}\n {2}\n {3}\n}}\n'.format(
+ *formatted_fields))
+
def testMessageToString(self, message_module):
message = message_module.ForeignMessage()
message.c = 123
diff --git a/python/google/protobuf/text_format.py b/python/google/protobuf/text_format.py
index 7211662..028a6ac 100755
--- a/python/google/protobuf/text_format.py
+++ b/python/google/protobuf/text_format.py
@@ -65,8 +65,6 @@
type_checkers.Int64ValueChecker())
_FLOAT_INFINITY = re.compile('-?inf(?:inity)?f?$', re.IGNORECASE)
_FLOAT_NAN = re.compile('nanf?$', re.IGNORECASE)
-_FLOAT_TYPES = frozenset([descriptor.FieldDescriptor.CPPTYPE_FLOAT,
- descriptor.FieldDescriptor.CPPTYPE_DOUBLE])
_QUOTES = frozenset(("'", '"'))
_ANY_FULL_TYPE_NAME = 'google.protobuf.Any'
@@ -126,6 +124,7 @@
pointy_brackets=False,
use_index_order=False,
float_format=None,
+ double_format=None,
use_field_number=False,
descriptor_pool=None,
indent=0,
@@ -153,8 +152,12 @@
will be printed at the end of the message and their relative order is
determined by the extension number. By default, use the field number
order.
- float_format: If set, use this to specify floating point number formatting
+ float_format: If set, use this to specify float field formatting
(per the "Format Specification Mini-Language"); otherwise, str() is used.
+ Also affect double field if double_format is not set.
+ double_format: If set, use this to specify double field formatting
+ (per the "Format Specification Mini-Language"); otherwise, float_format
+ is used.
use_field_number: If True, print field numbers instead of names.
descriptor_pool: A DescriptorPool used to resolve Any types.
indent: The initial indent level, in terms of spaces, for pretty print.
@@ -169,7 +172,8 @@
out = TextWriter(as_utf8)
printer = _Printer(out, indent, as_utf8, as_one_line,
use_short_repeated_primitives, pointy_brackets,
- use_index_order, float_format, use_field_number,
+ use_index_order, float_format, double_format,
+ use_field_number,
descriptor_pool, message_formatter,
print_unknown_fields=print_unknown_fields)
printer.PrintMessage(message)
@@ -205,6 +209,7 @@
pointy_brackets=False,
use_index_order=False,
float_format=None,
+ double_format=None,
use_field_number=False,
descriptor_pool=None,
message_formatter=None,
@@ -216,6 +221,7 @@
pointy_brackets=pointy_brackets,
use_index_order=use_index_order,
float_format=float_format,
+ double_format=double_format,
use_field_number=use_field_number,
descriptor_pool=descriptor_pool,
message_formatter=message_formatter,
@@ -233,12 +239,13 @@
pointy_brackets=False,
use_index_order=False,
float_format=None,
+ double_format=None,
message_formatter=None,
print_unknown_fields=False):
"""Print a single field name/value pair."""
printer = _Printer(out, indent, as_utf8, as_one_line,
use_short_repeated_primitives, pointy_brackets,
- use_index_order, float_format,
+ use_index_order, float_format, double_format,
message_formatter=message_formatter,
print_unknown_fields=print_unknown_fields)
printer.PrintField(field, value)
@@ -254,12 +261,13 @@
pointy_brackets=False,
use_index_order=False,
float_format=None,
+ double_format=None,
message_formatter=None,
print_unknown_fields=False):
"""Print a single field value (not including name)."""
printer = _Printer(out, indent, as_utf8, as_one_line,
use_short_repeated_primitives, pointy_brackets,
- use_index_order, float_format,
+ use_index_order, float_format, double_format,
message_formatter=message_formatter,
print_unknown_fields=print_unknown_fields)
printer.PrintFieldValue(field, value)
@@ -307,6 +315,7 @@
pointy_brackets=False,
use_index_order=False,
float_format=None,
+ double_format=None,
use_field_number=False,
descriptor_pool=None,
message_formatter=None,
@@ -333,7 +342,9 @@
field number order.
float_format: If set, use this to specify floating point number formatting
(per the "Format Specification Mini-Language"); otherwise, str() is
- used.
+ used. Also affect double field if double_format is not set.
+ double_format: If set, use this to specify double field formatting;
+ otherwise, float_format is used.
use_field_number: If True, print field numbers instead of names.
descriptor_pool: A DescriptorPool used to resolve Any types.
message_formatter: A function(message, indent, as_one_line): unicode|None
@@ -349,6 +360,10 @@
self.pointy_brackets = pointy_brackets
self.use_index_order = use_index_order
self.float_format = float_format
+ if double_format is not None:
+ self.double_format = double_format
+ else:
+ self.double_format = float_format
self.use_field_number = use_field_number
self.descriptor_pool = descriptor_pool
self.message_formatter = message_formatter
@@ -574,8 +589,12 @@
out.write('true')
else:
out.write('false')
- elif field.cpp_type in _FLOAT_TYPES and self.float_format is not None:
+ elif (field.cpp_type == descriptor.FieldDescriptor.CPPTYPE_FLOAT and
+ self.float_format is not None):
out.write('{1:{0}}'.format(self.float_format, value))
+ elif (field.cpp_type == descriptor.FieldDescriptor.CPPTYPE_DOUBLE and
+ self.double_format is not None):
+ out.write('{1:{0}}'.format(self.double_format, value))
else:
out.write(str(value))
diff --git a/src/google/protobuf/any.pb.cc b/src/google/protobuf/any.pb.cc
index 404de6f..3ee2608 100644
--- a/src/google/protobuf/any.pb.cc
+++ b/src/google/protobuf/any.pb.cc
@@ -57,12 +57,6 @@
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Any_default_instance_),
};
-static ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fany_2eproto = {
- {}, AddDescriptors_google_2fprotobuf_2fany_2eproto, "google/protobuf/any.proto", schemas,
- file_default_instances, TableStruct_google_2fprotobuf_2fany_2eproto::offsets,
- file_level_metadata_google_2fprotobuf_2fany_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2fany_2eproto, file_level_service_descriptors_google_2fprotobuf_2fany_2eproto,
-};
-
const char descriptor_table_protodef_google_2fprotobuf_2fany_2eproto[] =
"\n\031google/protobuf/any.proto\022\017google.prot"
"obuf\"&\n\003Any\022\020\n\010type_url\030\001 \001(\t\022\r\n\005value\030\002"
@@ -71,9 +65,12 @@
"\003GPB\252\002\036Google.Protobuf.WellKnownTypesb\006p"
"roto3"
;
+static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fany_2eproto_once;
static ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fany_2eproto = {
- false, descriptor_table_protodef_google_2fprotobuf_2fany_2eproto,
- "google/protobuf/any.proto", &assign_descriptors_table_google_2fprotobuf_2fany_2eproto, 205,
+ false, descriptor_table_protodef_google_2fprotobuf_2fany_2eproto, "google/protobuf/any.proto", 205,
+ &descriptor_table_google_2fprotobuf_2fany_2eproto_once, AddDescriptors_google_2fprotobuf_2fany_2eproto, schemas,
+ file_default_instances, TableStruct_google_2fprotobuf_2fany_2eproto::offsets,
+ file_level_metadata_google_2fprotobuf_2fany_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2fany_2eproto, file_level_service_descriptors_google_2fprotobuf_2fany_2eproto,
};
void AddDescriptors_google_2fprotobuf_2fany_2eproto() {
@@ -440,7 +437,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata Any::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fany_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fany_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fany_2eproto[kIndexInFileMessages];
}
diff --git a/src/google/protobuf/api.pb.cc b/src/google/protobuf/api.pb.cc
index c9e2123..fdd155f 100644
--- a/src/google/protobuf/api.pb.cc
+++ b/src/google/protobuf/api.pb.cc
@@ -130,12 +130,6 @@
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Mixin_default_instance_),
};
-static ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fapi_2eproto = {
- {}, AddDescriptors_google_2fprotobuf_2fapi_2eproto, "google/protobuf/api.proto", schemas,
- file_default_instances, TableStruct_google_2fprotobuf_2fapi_2eproto::offsets,
- file_level_metadata_google_2fprotobuf_2fapi_2eproto, 3, file_level_enum_descriptors_google_2fprotobuf_2fapi_2eproto, file_level_service_descriptors_google_2fprotobuf_2fapi_2eproto,
-};
-
const char descriptor_table_protodef_google_2fprotobuf_2fapi_2eproto[] =
"\n\031google/protobuf/api.proto\022\017google.prot"
"obuf\032$google/protobuf/source_context.pro"
@@ -157,9 +151,12 @@
"nproto/protobuf/api;api\242\002\003GPB\252\002\036Google.P"
"rotobuf.WellKnownTypesb\006proto3"
;
+static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fapi_2eproto_once;
static ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fapi_2eproto = {
- false, descriptor_table_protodef_google_2fprotobuf_2fapi_2eproto,
- "google/protobuf/api.proto", &assign_descriptors_table_google_2fprotobuf_2fapi_2eproto, 750,
+ false, descriptor_table_protodef_google_2fprotobuf_2fapi_2eproto, "google/protobuf/api.proto", 750,
+ &descriptor_table_google_2fprotobuf_2fapi_2eproto_once, AddDescriptors_google_2fprotobuf_2fapi_2eproto, schemas,
+ file_default_instances, TableStruct_google_2fprotobuf_2fapi_2eproto::offsets,
+ file_level_metadata_google_2fprotobuf_2fapi_2eproto, 3, file_level_enum_descriptors_google_2fprotobuf_2fapi_2eproto, file_level_service_descriptors_google_2fprotobuf_2fapi_2eproto,
};
void AddDescriptors_google_2fprotobuf_2fapi_2eproto() {
@@ -803,7 +800,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata Api::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fapi_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fapi_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fapi_2eproto[kIndexInFileMessages];
}
@@ -1403,7 +1400,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata Method::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fapi_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fapi_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fapi_2eproto[kIndexInFileMessages];
}
@@ -1746,7 +1743,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata Mixin::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fapi_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fapi_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fapi_2eproto[kIndexInFileMessages];
}
diff --git a/src/google/protobuf/compiler/cpp/cpp_enum.cc b/src/google/protobuf/compiler/cpp/cpp_enum.cc
index e59099e..5e2ac25 100644
--- a/src/google/protobuf/compiler/cpp/cpp_enum.cc
+++ b/src/google/protobuf/compiler/cpp/cpp_enum.cc
@@ -241,7 +241,7 @@
if (HasDescriptorMethods(descriptor_->file(), options_)) {
format(
"const ::$proto_ns$::EnumDescriptor* $classname$_descriptor() {\n"
- " ::$proto_ns$::internal::AssignDescriptors(&$assign_desc_table$);\n"
+ " ::$proto_ns$::internal::AssignDescriptors(&$desc_table$);\n"
" return $file_level_enum_descriptors$[$1$];\n"
"}\n",
idx);
diff --git a/src/google/protobuf/compiler/cpp/cpp_file.cc b/src/google/protobuf/compiler/cpp/cpp_file.cc
index 7164bd7..479d5b3 100644
--- a/src/google/protobuf/compiler/cpp/cpp_file.cc
+++ b/src/google/protobuf/compiler/cpp/cpp_file.cc
@@ -64,10 +64,9 @@
SetCommonVars(options, &variables_);
variables_["dllexport_decl"] = options.dllexport_decl;
variables_["tablename"] = UniqueName("TableStruct", file_, options_);
- variables_["assign_desc_table"] =
- UniqueName("assign_descriptors_table", file_, options_);
variables_["file_level_metadata"] =
UniqueName("file_level_metadata", file_, options_);
+ variables_["desc_table"] = UniqueName("descriptor_table", file_, options_),
variables_["file_level_enum_descriptors"] =
UniqueName("file_level_enum_descriptors", file_, options_);
variables_["file_level_service_descriptors"] =
@@ -758,21 +757,6 @@
// ---------------------------------------------------------------
- // protobuf_AssignDescriptorsOnce(): The first time it is called, calls
- // AssignDescriptors(). All later times, waits for the first call to
- // complete and then returns.
- format(
- "static "
- "::$proto_ns$::internal::AssignDescriptorsTable $assign_desc_table$ = "
- "{\n"
- " {}, $add_descriptors$, \"$filename$\", schemas,\n"
- " file_default_instances, $tablename$::offsets,\n"
- " $file_level_metadata$, $1$, $file_level_enum_descriptors$, "
- "$file_level_service_descriptors$,\n"
- "};\n"
- "\n",
- message_generators_.size());
-
// Embed the descriptor. We simply serialize the entire
// FileDescriptorProto/ and embed it as a string literal, which is parsed and
// built into real descriptors at initialization time.
@@ -812,21 +796,26 @@
}
format.Outdent();
- // Now generate the AddDescriptors() function.
- format(
- "static "
- "::$proto_ns$::internal::DescriptorTable $1$ = {\n"
- " false, $2$,\n",
- UniqueName("descriptor_table", file_, options_), protodef_name);
+ int num_deps = file_->dependency_count();
- const int num_deps = file_->dependency_count();
+ // Now generate the AddDescriptors() function.
+ // We have to make the once flag separate on account of MSVC 2015, which
+ // does not linker-initialize constexpr constructors. :(
format(
- " \"$filename$\", &$assign_desc_table$, $1$,\n"
+ "static ::$proto_ns$::internal::once_flag $desc_table$_once;\n"
+ "static "
+ "::$proto_ns$::internal::DescriptorTable $desc_table$ = {\n"
+ " false, $1$, \"$filename$\", $2$,\n"
+ " &$desc_table$_once, $add_descriptors$, schemas,\n"
+ " file_default_instances, $tablename$::offsets,\n"
+ " $file_level_metadata$, $3$, $file_level_enum_descriptors$, "
+ "$file_level_service_descriptors$,\n"
"};\n\n"
"void $add_descriptors$() {\n"
- " static constexpr ::$proto_ns$::internal::InitFunc deps[$2$] =\n"
+ " static constexpr ::$proto_ns$::internal::InitFunc deps[$4$] =\n"
" {\n",
- file_data.size(), std::max(num_deps, 1));
+ protodef_name, file_data.size(), message_generators_.size(),
+ std::max(num_deps, 1));
for (int i = 0; i < num_deps; i++) {
const FileDescriptor* dependency = file_->dependency(i);
format(" ::$1$,\n", UniqueName("AddDescriptors", dependency, options_));
@@ -843,10 +832,9 @@
scc_name);
}
format(
- " ::$proto_ns$::internal::AddDescriptors(&$1$, deps, $2$);\n"
+ " ::$proto_ns$::internal::AddDescriptors(&$desc_table$, deps, $1$);\n"
"}\n\n",
- UniqueName("descriptor_table", file_, options_), // 1
- num_deps); // 2
+ num_deps); // 1
format(
"// Force running AddDescriptors() at dynamic initialization time.\n"
"static bool $1$ = []() { $add_descriptors$(); return true; }();\n",
diff --git a/src/google/protobuf/compiler/cpp/cpp_message.cc b/src/google/protobuf/compiler/cpp/cpp_message.cc
index d73d523..84bd999 100644
--- a/src/google/protobuf/compiler/cpp/cpp_message.cc
+++ b/src/google/protobuf/compiler/cpp/cpp_message.cc
@@ -1894,7 +1894,7 @@
format(
"::$proto_ns$::Metadata $classname$::GetMetadata() const {\n"
" "
- "::$proto_ns$::internal::AssignDescriptors(&::$assign_desc_table$);\n"
+ "::$proto_ns$::internal::AssignDescriptors(&::$desc_table$);\n"
" return ::$file_level_metadata$[$1$];\n"
"}\n",
index_in_file_messages_);
@@ -2049,7 +2049,7 @@
if (HasDescriptorMethods(descriptor_->file(), options_)) {
format(
"::$proto_ns$::Metadata $classname$::GetMetadata() const {\n"
- " ::$proto_ns$::internal::AssignDescriptors(&::$assign_desc_table$);\n"
+ " ::$proto_ns$::internal::AssignDescriptors(&::$desc_table$);\n"
" return ::$file_level_metadata$[kIndexInFileMessages];\n"
"}\n"
"\n");
diff --git a/src/google/protobuf/compiler/cpp/cpp_service.cc b/src/google/protobuf/compiler/cpp/cpp_service.cc
index 79738c5..ec5e32a 100644
--- a/src/google/protobuf/compiler/cpp/cpp_service.cc
+++ b/src/google/protobuf/compiler/cpp/cpp_service.cc
@@ -182,7 +182,7 @@
"\n"
"const ::$proto_ns$::ServiceDescriptor* $classname$::descriptor() {\n"
" "
- "::$proto_ns$::internal::AssignDescriptors(&$assign_desc_table$);\n"
+ "::$proto_ns$::internal::AssignDescriptors(&$desc_table$);\n"
" return $file_level_service_descriptors$[$1$];\n"
"}\n"
"\n"
diff --git a/src/google/protobuf/compiler/plugin.pb.cc b/src/google/protobuf/compiler/plugin.pb.cc
index 16ea252..bdda945 100644
--- a/src/google/protobuf/compiler/plugin.pb.cc
+++ b/src/google/protobuf/compiler/plugin.pb.cc
@@ -164,12 +164,6 @@
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorResponse_default_instance_),
};
-static ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto = {
- {}, AddDescriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto, "google/protobuf/compiler/plugin.proto", schemas,
- file_default_instances, TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto::offsets,
- file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto, 4, file_level_enum_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto, file_level_service_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto,
-};
-
const char descriptor_table_protodef_google_2fprotobuf_2fcompiler_2fplugin_2eproto[] =
"\n%google/protobuf/compiler/plugin.proto\022"
"\030google.protobuf.compiler\032 google/protob"
@@ -188,9 +182,12 @@
"pilerB\014PluginProtosZ9github.com/golang/p"
"rotobuf/protoc-gen-go/plugin;plugin_go"
;
+static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_once;
static ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto = {
- false, descriptor_table_protodef_google_2fprotobuf_2fcompiler_2fplugin_2eproto,
- "google/protobuf/compiler/plugin.proto", &assign_descriptors_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto, 638,
+ false, descriptor_table_protodef_google_2fprotobuf_2fcompiler_2fplugin_2eproto, "google/protobuf/compiler/plugin.proto", 638,
+ &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_once, AddDescriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto, schemas,
+ file_default_instances, TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto::offsets,
+ file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto, 4, file_level_enum_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto, file_level_service_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto,
};
void AddDescriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto() {
@@ -654,7 +651,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata Version::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto[kIndexInFileMessages];
}
@@ -1140,7 +1137,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata CodeGeneratorRequest::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto[kIndexInFileMessages];
}
@@ -1579,7 +1576,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata CodeGeneratorResponse_File::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto[kIndexInFileMessages];
}
@@ -1929,7 +1926,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata CodeGeneratorResponse::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto[kIndexInFileMessages];
}
diff --git a/src/google/protobuf/descriptor.pb.cc b/src/google/protobuf/descriptor.pb.cc
index f85087e..c7bd3a1 100644
--- a/src/google/protobuf/descriptor.pb.cc
+++ b/src/google/protobuf/descriptor.pb.cc
@@ -1013,12 +1013,6 @@
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_GeneratedCodeInfo_default_instance_),
};
-static ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto = {
- {}, AddDescriptors_google_2fprotobuf_2fdescriptor_2eproto, "google/protobuf/descriptor.proto", schemas,
- file_default_instances, TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets,
- file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto, 27, file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto, file_level_service_descriptors_google_2fprotobuf_2fdescriptor_2eproto,
-};
-
const char descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto[] =
"\n google/protobuf/descriptor.proto\022\017goog"
"le.protobuf\"G\n\021FileDescriptorSet\0222\n\004file"
@@ -1172,9 +1166,12 @@
"go/descriptor;descriptor\370\001\001\242\002\003GPB\252\002\032Goog"
"le.Protobuf.Reflection"
;
+static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once;
static ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fdescriptor_2eproto = {
- false, descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto,
- "google/protobuf/descriptor.proto", &assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto, 6022,
+ false, descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto, "google/protobuf/descriptor.proto", 6022,
+ &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once, AddDescriptors_google_2fprotobuf_2fdescriptor_2eproto, schemas,
+ file_default_instances, TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets,
+ file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto, 27, file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto, file_level_service_descriptors_google_2fprotobuf_2fdescriptor_2eproto,
};
void AddDescriptors_google_2fprotobuf_2fdescriptor_2eproto() {
@@ -1215,7 +1212,7 @@
static bool dynamic_init_dummy_google_2fprotobuf_2fdescriptor_2eproto = []() { AddDescriptors_google_2fprotobuf_2fdescriptor_2eproto(); return true; }();
PROTOBUF_NAMESPACE_OPEN
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FieldDescriptorProto_Type_descriptor() {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[0];
}
bool FieldDescriptorProto_Type_IsValid(int value) {
@@ -1268,7 +1265,7 @@
constexpr int FieldDescriptorProto::Type_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FieldDescriptorProto_Label_descriptor() {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[1];
}
bool FieldDescriptorProto_Label_IsValid(int value) {
@@ -1291,7 +1288,7 @@
constexpr int FieldDescriptorProto::Label_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FileOptions_OptimizeMode_descriptor() {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[2];
}
bool FileOptions_OptimizeMode_IsValid(int value) {
@@ -1314,7 +1311,7 @@
constexpr int FileOptions::OptimizeMode_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FieldOptions_CType_descriptor() {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[3];
}
bool FieldOptions_CType_IsValid(int value) {
@@ -1337,7 +1334,7 @@
constexpr int FieldOptions::CType_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FieldOptions_JSType_descriptor() {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[4];
}
bool FieldOptions_JSType_IsValid(int value) {
@@ -1360,7 +1357,7 @@
constexpr int FieldOptions::JSType_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* MethodOptions_IdempotencyLevel_descriptor() {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[5];
}
bool MethodOptions_IdempotencyLevel_IsValid(int value) {
@@ -1685,7 +1682,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata FileDescriptorSet::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -2720,7 +2717,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata FileDescriptorProto::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -3163,7 +3160,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata DescriptorProto_ExtensionRange::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -3525,7 +3522,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata DescriptorProto_ReservedRange::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -4403,7 +4400,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata DescriptorProto::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -4740,7 +4737,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata ExtensionRangeOptions::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -5655,7 +5652,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata FieldDescriptorProto::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -6066,7 +6063,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata OneofDescriptorProto::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -6428,7 +6425,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata EnumDescriptorProto_EnumReservedRange::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -7016,7 +7013,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata EnumDescriptorProto::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -7478,7 +7475,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata EnumValueDescriptorProto::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -7947,7 +7944,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata ServiceDescriptorProto::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -8593,7 +8590,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata MethodDescriptorProto::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -10116,7 +10113,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata FileOptions::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -10649,7 +10646,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata MessageOptions::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -11299,7 +11296,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata FieldOptions::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -11636,7 +11633,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata OneofOptions::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -12081,7 +12078,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata EnumOptions::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -12470,7 +12467,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata EnumValueOptions::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -12859,7 +12856,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata ServiceOptions::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -13320,7 +13317,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata MethodOptions::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -13713,7 +13710,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata UninterpretedOption_NamePart::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -14376,7 +14373,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata UninterpretedOption::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -14992,7 +14989,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata SourceCodeInfo_Location::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -15298,7 +15295,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata SourceCodeInfo::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -15808,7 +15805,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata GeneratedCodeInfo_Annotation::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
@@ -16114,7 +16111,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata GeneratedCodeInfo::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages];
}
diff --git a/src/google/protobuf/descriptor.proto b/src/google/protobuf/descriptor.proto
index 8c1273d..d5d794f 100644
--- a/src/google/protobuf/descriptor.proto
+++ b/src/google/protobuf/descriptor.proto
@@ -40,6 +40,7 @@
syntax = "proto2";
package google.protobuf;
+
option go_package = "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor";
option java_package = "com.google.protobuf";
option java_outer_classname = "DescriptorProtos";
@@ -59,8 +60,8 @@
// Describes a complete .proto file.
message FileDescriptorProto {
- optional string name = 1; // file name, relative to root of source tree
- optional string package = 2; // e.g. "foo", "foo.bar", etc.
+ optional string name = 1; // file name, relative to root of source tree
+ optional string package = 2; // e.g. "foo", "foo.bar", etc.
// Names of files imported by this file.
repeated string dependency = 3;
@@ -115,8 +116,8 @@
// fields or extension ranges in the same message. Reserved ranges may
// not overlap.
message ReservedRange {
- optional int32 start = 1; // Inclusive.
- optional int32 end = 2; // Exclusive.
+ optional int32 start = 1; // Inclusive.
+ optional int32 end = 2; // Exclusive.
}
repeated ReservedRange reserved_range = 9;
// Reserved field names, which may not be used by fields in the same message.
@@ -137,42 +138,42 @@
enum Type {
// 0 is reserved for errors.
// Order is weird for historical reasons.
- TYPE_DOUBLE = 1;
- TYPE_FLOAT = 2;
+ TYPE_DOUBLE = 1;
+ TYPE_FLOAT = 2;
// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
// negative values are likely.
- TYPE_INT64 = 3;
- TYPE_UINT64 = 4;
+ TYPE_INT64 = 3;
+ TYPE_UINT64 = 4;
// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
// negative values are likely.
- TYPE_INT32 = 5;
- TYPE_FIXED64 = 6;
- TYPE_FIXED32 = 7;
- TYPE_BOOL = 8;
- TYPE_STRING = 9;
+ TYPE_INT32 = 5;
+ TYPE_FIXED64 = 6;
+ TYPE_FIXED32 = 7;
+ TYPE_BOOL = 8;
+ TYPE_STRING = 9;
// Tag-delimited aggregate.
// Group type is deprecated and not supported in proto3. However, Proto3
// implementations should still be able to parse the group wire format and
// treat group fields as unknown fields.
- TYPE_GROUP = 10;
- TYPE_MESSAGE = 11; // Length-delimited aggregate.
+ TYPE_GROUP = 10;
+ TYPE_MESSAGE = 11; // Length-delimited aggregate.
// New in version 2.
- TYPE_BYTES = 12;
- TYPE_UINT32 = 13;
- TYPE_ENUM = 14;
- TYPE_SFIXED32 = 15;
- TYPE_SFIXED64 = 16;
- TYPE_SINT32 = 17; // Uses ZigZag encoding.
- TYPE_SINT64 = 18; // Uses ZigZag encoding.
- };
+ TYPE_BYTES = 12;
+ TYPE_UINT32 = 13;
+ TYPE_ENUM = 14;
+ TYPE_SFIXED32 = 15;
+ TYPE_SFIXED64 = 16;
+ TYPE_SINT32 = 17; // Uses ZigZag encoding.
+ TYPE_SINT64 = 18; // Uses ZigZag encoding.
+ }
enum Label {
// 0 is reserved for errors
- LABEL_OPTIONAL = 1;
- LABEL_REQUIRED = 2;
- LABEL_REPEATED = 3;
- };
+ LABEL_OPTIONAL = 1;
+ LABEL_REQUIRED = 2;
+ LABEL_REPEATED = 3;
+ }
optional string name = 1;
optional int32 number = 3;
@@ -234,8 +235,8 @@
// is inclusive such that it can appropriately represent the entire int32
// domain.
message EnumReservedRange {
- optional int32 start = 1; // Inclusive.
- optional int32 end = 2; // Inclusive.
+ optional int32 start = 1; // Inclusive.
+ optional int32 end = 2; // Inclusive.
}
// Range of reserved numeric values. Reserved numeric values may not be used
@@ -276,9 +277,9 @@
optional MethodOptions options = 4;
// Identifies if client streams multiple client messages
- optional bool client_streaming = 5 [default=false];
+ optional bool client_streaming = 5 [default = false];
// Identifies if server streams multiple server messages
- optional bool server_streaming = 6 [default=false];
+ optional bool server_streaming = 6 [default = false];
}
@@ -314,7 +315,6 @@
// If this turns out to be popular, a web service will be set up
// to automatically assign option numbers.
-
message FileOptions {
// Sets the Java package where classes generated from this .proto will be
@@ -337,7 +337,7 @@
// named by java_outer_classname. However, the outer class will still be
// generated to contain the file's getDescriptor() method as well as any
// top-level extensions defined in the file.
- optional bool java_multiple_files = 10 [default=false];
+ optional bool java_multiple_files = 10 [default = false];
// This option does nothing.
optional bool java_generate_equals_and_hash = 20 [deprecated=true];
@@ -348,17 +348,17 @@
// Message reflection will do the same.
// However, an extension field still accepts non-UTF-8 byte sequences.
// This option has no effect on when used with the lite runtime.
- optional bool java_string_check_utf8 = 27 [default=false];
+ optional bool java_string_check_utf8 = 27 [default = false];
// Generated classes can be optimized for speed or code size.
enum OptimizeMode {
- SPEED = 1; // Generate complete code for parsing, serialization,
- // etc.
- CODE_SIZE = 2; // Use ReflectionOps to implement these methods.
- LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime.
+ SPEED = 1; // Generate complete code for parsing, serialization,
+ // etc.
+ CODE_SIZE = 2; // Use ReflectionOps to implement these methods.
+ LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime.
}
- optional OptimizeMode optimize_for = 9 [default=SPEED];
+ optional OptimizeMode optimize_for = 9 [default = SPEED];
// Sets the Go package where structs generated from this .proto will be
// placed. If omitted, the Go package will be derived from the following:
@@ -379,20 +379,20 @@
// that generate code specific to your particular RPC system. Therefore,
// these default to false. Old code which depends on generic services should
// explicitly set them to true.
- optional bool cc_generic_services = 16 [default=false];
- optional bool java_generic_services = 17 [default=false];
- optional bool py_generic_services = 18 [default=false];
- optional bool php_generic_services = 42 [default=false];
+ optional bool cc_generic_services = 16 [default = false];
+ optional bool java_generic_services = 17 [default = false];
+ optional bool py_generic_services = 18 [default = false];
+ optional bool php_generic_services = 42 [default = false];
// Is this file deprecated?
// Depending on the target platform, this can emit Deprecated annotations
// for everything in the file, or it will be completely ignored; in the very
// least, this is a formalization for deprecating files.
- optional bool deprecated = 23 [default=false];
+ optional bool deprecated = 23 [default = false];
// Enables the use of arenas for the proto messages in this file. This applies
// only to generated classes for C++.
- optional bool cc_enable_arenas = 31 [default=false];
+ optional bool cc_enable_arenas = 31 [default = false];
// Sets the objective c class prefix which is prepended to all objective c
@@ -418,8 +418,8 @@
optional string php_namespace = 41;
// Use this option to change the namespace of php generated metadata classes.
- // Default is empty. When this option is empty, the proto file name will be used
- // for determining the namespace.
+ // Default is empty. When this option is empty, the proto file name will be
+ // used for determining the namespace.
optional string php_metadata_namespace = 44;
// Use this option to change the package of ruby generated classes. Default
@@ -457,18 +457,18 @@
//
// Because this is an option, the above two restrictions are not enforced by
// the protocol compiler.
- optional bool message_set_wire_format = 1 [default=false];
+ optional bool message_set_wire_format = 1 [default = false];
// Disables the generation of the standard "descriptor()" accessor, which can
// conflict with a field of the same name. This is meant to make migration
// from proto1 easier; new code should avoid fields named "descriptor".
- optional bool no_standard_descriptor_accessor = 2 [default=false];
+ optional bool no_standard_descriptor_accessor = 2 [default = false];
// Is this message deprecated?
// Depending on the target platform, this can emit Deprecated annotations
// for the message, or it will be completely ignored; in the very least,
// this is a formalization for deprecating messages.
- optional bool deprecated = 3 [default=false];
+ optional bool deprecated = 3 [default = false];
// Whether the message is an automatically generated map entry type for the
// maps field.
@@ -575,16 +575,16 @@
// implementation must either *always* check its required fields, or *never*
// check its required fields, regardless of whether or not the message has
// been parsed.
- optional bool lazy = 5 [default=false];
+ optional bool lazy = 5 [default = false];
// Is this field deprecated?
// Depending on the target platform, this can emit Deprecated annotations
// for accessors, or it will be completely ignored; in the very least, this
// is a formalization for deprecating fields.
- optional bool deprecated = 3 [default=false];
+ optional bool deprecated = 3 [default = false];
// For Google-internal migration only. Do not use.
- optional bool weak = 10 [default=false];
+ optional bool weak = 10 [default = false];
// The parser stores options it doesn't recognize here. See above.
@@ -614,7 +614,7 @@
// Depending on the target platform, this can emit Deprecated annotations
// for the enum, or it will be completely ignored; in the very least, this
// is a formalization for deprecating enums.
- optional bool deprecated = 3 [default=false];
+ optional bool deprecated = 3 [default = false];
reserved 5; // javanano_as_lite
@@ -630,7 +630,7 @@
// Depending on the target platform, this can emit Deprecated annotations
// for the enum value, or it will be completely ignored; in the very least,
// this is a formalization for deprecating enum values.
- optional bool deprecated = 1 [default=false];
+ optional bool deprecated = 1 [default = false];
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
@@ -650,7 +650,7 @@
// Depending on the target platform, this can emit Deprecated annotations
// for the service, or it will be completely ignored; in the very least,
// this is a formalization for deprecating services.
- optional bool deprecated = 33 [default=false];
+ optional bool deprecated = 33 [default = false];
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
@@ -670,18 +670,18 @@
// Depending on the target platform, this can emit Deprecated annotations
// for the method, or it will be completely ignored; in the very least,
// this is a formalization for deprecating methods.
- optional bool deprecated = 33 [default=false];
+ optional bool deprecated = 33 [default = false];
// Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
// or neither? HTTP based RPC implementation may choose GET verb for safe
// methods, and PUT verb for idempotent methods instead of the default POST.
enum IdempotencyLevel {
IDEMPOTENCY_UNKNOWN = 0;
- NO_SIDE_EFFECTS = 1; // implies idempotent
- IDEMPOTENT = 2; // idempotent, but may have side effects
+ NO_SIDE_EFFECTS = 1; // implies idempotent
+ IDEMPOTENT = 2; // idempotent, but may have side effects
}
- optional IdempotencyLevel idempotency_level =
- 34 [default=IDEMPOTENCY_UNKNOWN];
+ optional IdempotencyLevel idempotency_level = 34
+ [default = IDEMPOTENCY_UNKNOWN];
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
@@ -793,14 +793,14 @@
// [ 4, 3, 2, 7 ]
// this path refers to the whole field declaration (from the beginning
// of the label to the terminating semicolon).
- repeated int32 path = 1 [packed=true];
+ repeated int32 path = 1 [packed = true];
// Always has exactly three or four elements: start line, start column,
// end line (optional, otherwise assumed same as start line), end column.
// These are packed into a single field for efficiency. Note that line
// and column numbers are zero-based -- typically you will want to add
// 1 to each before displaying to a user.
- repeated int32 span = 2 [packed=true];
+ repeated int32 span = 2 [packed = true];
// If this SourceCodeInfo represents a complete declaration, these are any
// comments appearing before and after the declaration which appear to be
@@ -865,7 +865,7 @@
message Annotation {
// Identifies the element in the original source .proto file. This field
// is formatted the same as SourceCodeInfo.Location.path.
- repeated int32 path = 1 [packed=true];
+ repeated int32 path = 1 [packed = true];
// Identifies the filesystem path to the original source .proto.
optional string source_file = 2;
diff --git a/src/google/protobuf/duration.pb.cc b/src/google/protobuf/duration.pb.cc
index 2f66112..995548c 100644
--- a/src/google/protobuf/duration.pb.cc
+++ b/src/google/protobuf/duration.pb.cc
@@ -57,12 +57,6 @@
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Duration_default_instance_),
};
-static ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fduration_2eproto = {
- {}, AddDescriptors_google_2fprotobuf_2fduration_2eproto, "google/protobuf/duration.proto", schemas,
- file_default_instances, TableStruct_google_2fprotobuf_2fduration_2eproto::offsets,
- file_level_metadata_google_2fprotobuf_2fduration_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2fduration_2eproto, file_level_service_descriptors_google_2fprotobuf_2fduration_2eproto,
-};
-
const char descriptor_table_protodef_google_2fprotobuf_2fduration_2eproto[] =
"\n\036google/protobuf/duration.proto\022\017google"
".protobuf\"*\n\010Duration\022\017\n\007seconds\030\001 \001(\003\022\r"
@@ -71,9 +65,12 @@
"f/ptypes/duration\370\001\001\242\002\003GPB\252\002\036Google.Prot"
"obuf.WellKnownTypesb\006proto3"
;
+static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fduration_2eproto_once;
static ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fduration_2eproto = {
- false, descriptor_table_protodef_google_2fprotobuf_2fduration_2eproto,
- "google/protobuf/duration.proto", &assign_descriptors_table_google_2fprotobuf_2fduration_2eproto, 227,
+ false, descriptor_table_protodef_google_2fprotobuf_2fduration_2eproto, "google/protobuf/duration.proto", 227,
+ &descriptor_table_google_2fprotobuf_2fduration_2eproto_once, AddDescriptors_google_2fprotobuf_2fduration_2eproto, schemas,
+ file_default_instances, TableStruct_google_2fprotobuf_2fduration_2eproto::offsets,
+ file_level_metadata_google_2fprotobuf_2fduration_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2fduration_2eproto, file_level_service_descriptors_google_2fprotobuf_2fduration_2eproto,
};
void AddDescriptors_google_2fprotobuf_2fduration_2eproto() {
@@ -419,7 +416,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata Duration::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fduration_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fduration_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fduration_2eproto[kIndexInFileMessages];
}
diff --git a/src/google/protobuf/empty.pb.cc b/src/google/protobuf/empty.pb.cc
index c10bf94..d27faae 100644
--- a/src/google/protobuf/empty.pb.cc
+++ b/src/google/protobuf/empty.pb.cc
@@ -55,12 +55,6 @@
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Empty_default_instance_),
};
-static ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fempty_2eproto = {
- {}, AddDescriptors_google_2fprotobuf_2fempty_2eproto, "google/protobuf/empty.proto", schemas,
- file_default_instances, TableStruct_google_2fprotobuf_2fempty_2eproto::offsets,
- file_level_metadata_google_2fprotobuf_2fempty_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2fempty_2eproto, file_level_service_descriptors_google_2fprotobuf_2fempty_2eproto,
-};
-
const char descriptor_table_protodef_google_2fprotobuf_2fempty_2eproto[] =
"\n\033google/protobuf/empty.proto\022\017google.pr"
"otobuf\"\007\n\005EmptyBv\n\023com.google.protobufB\n"
@@ -68,9 +62,12 @@
"/ptypes/empty\370\001\001\242\002\003GPB\252\002\036Google.Protobuf"
".WellKnownTypesb\006proto3"
;
+static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fempty_2eproto_once;
static ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fempty_2eproto = {
- false, descriptor_table_protodef_google_2fprotobuf_2fempty_2eproto,
- "google/protobuf/empty.proto", &assign_descriptors_table_google_2fprotobuf_2fempty_2eproto, 183,
+ false, descriptor_table_protodef_google_2fprotobuf_2fempty_2eproto, "google/protobuf/empty.proto", 183,
+ &descriptor_table_google_2fprotobuf_2fempty_2eproto_once, AddDescriptors_google_2fprotobuf_2fempty_2eproto, schemas,
+ file_default_instances, TableStruct_google_2fprotobuf_2fempty_2eproto::offsets,
+ file_level_metadata_google_2fprotobuf_2fempty_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2fempty_2eproto, file_level_service_descriptors_google_2fprotobuf_2fempty_2eproto,
};
void AddDescriptors_google_2fprotobuf_2fempty_2eproto() {
@@ -317,7 +314,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata Empty::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fempty_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fempty_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fempty_2eproto[kIndexInFileMessages];
}
diff --git a/src/google/protobuf/field_mask.pb.cc b/src/google/protobuf/field_mask.pb.cc
index e360a6d..97f5669 100644
--- a/src/google/protobuf/field_mask.pb.cc
+++ b/src/google/protobuf/field_mask.pb.cc
@@ -56,12 +56,6 @@
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_FieldMask_default_instance_),
};
-static ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2ffield_5fmask_2eproto = {
- {}, AddDescriptors_google_2fprotobuf_2ffield_5fmask_2eproto, "google/protobuf/field_mask.proto", schemas,
- file_default_instances, TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto::offsets,
- file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto, file_level_service_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto,
-};
-
const char descriptor_table_protodef_google_2fprotobuf_2ffield_5fmask_2eproto[] =
"\n google/protobuf/field_mask.proto\022\017goog"
"le.protobuf\"\032\n\tFieldMask\022\r\n\005paths\030\001 \003(\tB"
@@ -70,9 +64,12 @@
"ield_mask;field_mask\370\001\001\242\002\003GPB\252\002\036Google.P"
"rotobuf.WellKnownTypesb\006proto3"
;
+static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_once;
static ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto = {
- false, descriptor_table_protodef_google_2fprotobuf_2ffield_5fmask_2eproto,
- "google/protobuf/field_mask.proto", &assign_descriptors_table_google_2fprotobuf_2ffield_5fmask_2eproto, 230,
+ false, descriptor_table_protodef_google_2fprotobuf_2ffield_5fmask_2eproto, "google/protobuf/field_mask.proto", 230,
+ &descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_once, AddDescriptors_google_2fprotobuf_2ffield_5fmask_2eproto, schemas,
+ file_default_instances, TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto::offsets,
+ file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto, file_level_service_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto,
};
void AddDescriptors_google_2fprotobuf_2ffield_5fmask_2eproto() {
@@ -389,7 +386,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata FieldMask::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2ffield_5fmask_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto);
return ::file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto[kIndexInFileMessages];
}
diff --git a/src/google/protobuf/generated_message_reflection.cc b/src/google/protobuf/generated_message_reflection.cc
index 9b2209a..ef57e1c 100644
--- a/src/google/protobuf/generated_message_reflection.cc
+++ b/src/google/protobuf/generated_message_reflection.cc
@@ -2305,7 +2305,7 @@
std::vector<std::pair<const Metadata*, const Metadata*> > metadata_arrays_;
};
-void AssignDescriptorsImpl(const AssignDescriptorsTable* table) {
+void AssignDescriptorsImpl(const DescriptorTable* table) {
// Ensure the file descriptor is added to the pool.
{
// This only happens once per proto file. So a global mutex to serialize
@@ -2342,7 +2342,7 @@
helper.GetCurrentMetadataPtr());
}
-void AddDescriptorsImpl(const DescriptorTable* table, const InitFunc* deps,
+void AddDescriptorsImpl(DescriptorTable* table, const InitFunc* deps,
int num_deps) {
// Ensure all dependent descriptors are registered to the generated descriptor
// pool and message factory.
@@ -2352,14 +2352,13 @@
}
// Register the descriptor of this file.
DescriptorPool::InternalAddGeneratedFile(table->descriptor, table->size);
- MessageFactory::InternalRegisterGeneratedFile(
- table->filename, table->assign_descriptors_table);
+ MessageFactory::InternalRegisterGeneratedFile(table);
}
} // namespace
-void AssignDescriptors(AssignDescriptorsTable* table) {
- call_once(table->once, AssignDescriptorsImpl, table);
+void AssignDescriptors(const DescriptorTable* table) {
+ call_once(*table->once, AssignDescriptorsImpl, table);
}
void AddDescriptors(DescriptorTable* table, const InitFunc* deps,
@@ -2380,17 +2379,13 @@
const GeneratedMessageReflection* reflection =
static_cast<const GeneratedMessageReflection*>(
file_level_metadata[i].reflection);
- if (reflection) {
- // It's not a map type
- MessageFactory::InternalRegisterGeneratedMessage(
- file_level_metadata[i].descriptor,
- reflection->schema_.default_instance_);
- }
+ MessageFactory::InternalRegisterGeneratedMessage(
+ file_level_metadata[i].descriptor,
+ reflection->schema_.default_instance_);
}
}
-void RegisterFileLevelMetadata(void* assign_descriptors_table) {
- auto table = static_cast<AssignDescriptorsTable*>(assign_descriptors_table);
+void RegisterFileLevelMetadata(DescriptorTable* table) {
AssignDescriptors(table);
RegisterAllTypesInternal(table->file_level_metadata, table->num_messages);
}
diff --git a/src/google/protobuf/generated_message_reflection.h b/src/google/protobuf/generated_message_reflection.h
index 820a148..3b9b2da 100644
--- a/src/google/protobuf/generated_message_reflection.h
+++ b/src/google/protobuf/generated_message_reflection.h
@@ -661,10 +661,13 @@
typedef void (*InitFunc)();
-struct PROTOBUF_EXPORT AssignDescriptorsTable {
- once_flag once;
- InitFunc add_descriptors;
+struct PROTOBUF_EXPORT DescriptorTable {
+ bool is_initialized;
+ const char* descriptor;
const char* filename;
+ int size; // of serialized descriptor
+ once_flag* once;
+ InitFunc add_descriptors;
const MigrationSchema* schemas;
const Message* const* default_instances;
const uint32* offsets;
@@ -675,16 +678,7 @@
const ServiceDescriptor** file_level_service_descriptors;
};
-void PROTOBUF_EXPORT AssignDescriptors(AssignDescriptorsTable* table);
-
-struct PROTOBUF_EXPORT DescriptorTable {
- bool is_initialized;
- const char* descriptor;
- const char* filename;
- AssignDescriptorsTable* assign_descriptors_table;
- int size; // of serialized descriptor
-};
-
+void PROTOBUF_EXPORT AssignDescriptors(const DescriptorTable* table);
void PROTOBUF_EXPORT AddDescriptors(DescriptorTable* table,
const InitFunc* deps, int num_deps);
diff --git a/src/google/protobuf/message.cc b/src/google/protobuf/message.cc
index 5fbae35..a31cd9c 100644
--- a/src/google/protobuf/message.cc
+++ b/src/google/protobuf/message.cc
@@ -66,6 +66,15 @@
namespace google {
namespace protobuf {
+namespace internal {
+
+// TODO(gerbens) make this factorized better. This should not have to hop
+// to reflection. Currently uses GeneratedMessageReflection and thus is
+// defined in generated_message_reflection.cc
+void RegisterFileLevelMetadata(DescriptorTable* descriptor_table);
+
+} // namespace internal
+
using internal::ReflectionOps;
using internal::WireFormat;
using internal::WireFormatLite;
@@ -662,22 +671,8 @@
MessageFactory::~MessageFactory() {}
-namespace internal {
-
-// TODO(gerbens) make this factorized better. This should not have to hop
-// to reflection. Currently uses GeneratedMessageReflection and thus is
-// defined in generated_message_reflection.cc
-void RegisterFileLevelMetadata(void* assign_descriptors_table);
-
-} // namespace internal
-
namespace {
-void RegisterFileLevelMetadata(void* assign_descriptors_table,
- const std::string& filename) {
- internal::RegisterFileLevelMetadata(assign_descriptors_table);
-}
-
class GeneratedMessageFactory : public MessageFactory {
public:
static GeneratedMessageFactory* singleton();
@@ -687,7 +682,7 @@
int size;
};
- void RegisterFile(const char* file, void* registration_data);
+ void RegisterFile(google::protobuf::internal::DescriptorTable* table);
void RegisterType(const Descriptor* descriptor, const Message* prototype);
// implements MessageFactory ---------------------------------------
@@ -695,8 +690,8 @@
private:
// Only written at static init time, so does not require locking.
- std::unordered_map<const char*, void*, hash<const char*>,
- streq>
+ std::unordered_map<const char*, google::protobuf::internal::DescriptorTable*,
+ hash<const char*>, streq>
file_map_;
internal::WrappedMutex mutex_;
@@ -710,10 +705,10 @@
return instance;
}
-void GeneratedMessageFactory::RegisterFile(const char* file,
- void* registration_data) {
- if (!InsertIfNotPresent(&file_map_, file, registration_data)) {
- GOOGLE_LOG(FATAL) << "File is already registered: " << file;
+void GeneratedMessageFactory::RegisterFile(
+ google::protobuf::internal::DescriptorTable* table) {
+ if (!InsertIfNotPresent(&file_map_, table->filename, table)) {
+ GOOGLE_LOG(FATAL) << "File is already registered: " << table->filename;
}
}
@@ -745,7 +740,7 @@
if (type->file()->pool() != DescriptorPool::generated_pool()) return NULL;
// Apparently the file hasn't been registered yet. Let's do that now.
- void* registration_data =
+ internal::DescriptorTable* registration_data =
FindPtrOrNull(file_map_, type->file()->name().c_str());
if (registration_data == NULL) {
GOOGLE_LOG(DFATAL) << "File appears to be in generated pool but wasn't "
@@ -760,7 +755,7 @@
const Message* result = FindPtrOrNull(type_map_, type);
if (result == NULL) {
// Nope. OK, register everything.
- RegisterFileLevelMetadata(registration_data, type->file()->name());
+ internal::RegisterFileLevelMetadata(registration_data);
// Should be here now.
result = FindPtrOrNull(type_map_, type);
}
@@ -780,9 +775,8 @@
}
void MessageFactory::InternalRegisterGeneratedFile(
- const char* filename, void* assign_descriptors_table) {
- GeneratedMessageFactory::singleton()->RegisterFile(filename,
- assign_descriptors_table);
+ google::protobuf::internal::DescriptorTable* table) {
+ GeneratedMessageFactory::singleton()->RegisterFile(table);
}
void MessageFactory::InternalRegisterGeneratedMessage(
diff --git a/src/google/protobuf/message.h b/src/google/protobuf/message.h
index e274383..3dc2526 100644
--- a/src/google/protobuf/message.h
+++ b/src/google/protobuf/message.h
@@ -147,6 +147,7 @@
class MapReflectionTester;
namespace internal {
+struct DescriptorTable;
class MapFieldBase;
}
class UnknownFieldSet; // unknown_field_set.h
@@ -1087,8 +1088,8 @@
// in the file. This strange mechanism is necessary because descriptors are
// built lazily, so we can't register types by their descriptor until we
// know that the descriptor exists. |filename| must be a permanent string.
- static void InternalRegisterGeneratedFile(const char* filename,
- void* assign_descriptors_table);
+ static void InternalRegisterGeneratedFile(
+ google::protobuf::internal::DescriptorTable* table);
// For internal use only: Registers a message type. Called only by the
// functions which are registered with InternalRegisterGeneratedFile(),
diff --git a/src/google/protobuf/source_context.pb.cc b/src/google/protobuf/source_context.pb.cc
index 1f66be5..cf93086 100644
--- a/src/google/protobuf/source_context.pb.cc
+++ b/src/google/protobuf/source_context.pb.cc
@@ -56,12 +56,6 @@
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_),
};
-static ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fsource_5fcontext_2eproto = {
- {}, AddDescriptors_google_2fprotobuf_2fsource_5fcontext_2eproto, "google/protobuf/source_context.proto", schemas,
- file_default_instances, TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto::offsets,
- file_level_metadata_google_2fprotobuf_2fsource_5fcontext_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto, file_level_service_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto,
-};
-
const char descriptor_table_protodef_google_2fprotobuf_2fsource_5fcontext_2eproto[] =
"\n$google/protobuf/source_context.proto\022\017"
"google.protobuf\"\"\n\rSourceContext\022\021\n\tfile"
@@ -71,9 +65,12 @@
"text\242\002\003GPB\252\002\036Google.Protobuf.WellKnownTy"
"pesb\006proto3"
;
+static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_once;
static ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto = {
- false, descriptor_table_protodef_google_2fprotobuf_2fsource_5fcontext_2eproto,
- "google/protobuf/source_context.proto", &assign_descriptors_table_google_2fprotobuf_2fsource_5fcontext_2eproto, 251,
+ false, descriptor_table_protodef_google_2fprotobuf_2fsource_5fcontext_2eproto, "google/protobuf/source_context.proto", 251,
+ &descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_once, AddDescriptors_google_2fprotobuf_2fsource_5fcontext_2eproto, schemas,
+ file_default_instances, TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto::offsets,
+ file_level_metadata_google_2fprotobuf_2fsource_5fcontext_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto, file_level_service_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto,
};
void AddDescriptors_google_2fprotobuf_2fsource_5fcontext_2eproto() {
@@ -362,7 +359,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata SourceContext::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fsource_5fcontext_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fsource_5fcontext_2eproto[kIndexInFileMessages];
}
diff --git a/src/google/protobuf/struct.pb.cc b/src/google/protobuf/struct.pb.cc
index a34cac3..69edaf6 100644
--- a/src/google/protobuf/struct.pb.cc
+++ b/src/google/protobuf/struct.pb.cc
@@ -125,12 +125,6 @@
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_ListValue_default_instance_),
};
-static ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fstruct_2eproto = {
- {}, AddDescriptors_google_2fprotobuf_2fstruct_2eproto, "google/protobuf/struct.proto", schemas,
- file_default_instances, TableStruct_google_2fprotobuf_2fstruct_2eproto::offsets,
- file_level_metadata_google_2fprotobuf_2fstruct_2eproto, 4, file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto, file_level_service_descriptors_google_2fprotobuf_2fstruct_2eproto,
-};
-
const char descriptor_table_protodef_google_2fprotobuf_2fstruct_2eproto[] =
"\n\034google/protobuf/struct.proto\022\017google.p"
"rotobuf\"\204\001\n\006Struct\0223\n\006fields\030\001 \003(\0132#.goo"
@@ -150,9 +144,12 @@
"\252\002\036Google.Protobuf.WellKnownTypesb\006proto"
"3"
;
+static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fstruct_2eproto_once;
static ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fstruct_2eproto = {
- false, descriptor_table_protodef_google_2fprotobuf_2fstruct_2eproto,
- "google/protobuf/struct.proto", &assign_descriptors_table_google_2fprotobuf_2fstruct_2eproto, 641,
+ false, descriptor_table_protodef_google_2fprotobuf_2fstruct_2eproto, "google/protobuf/struct.proto", 641,
+ &descriptor_table_google_2fprotobuf_2fstruct_2eproto_once, AddDescriptors_google_2fprotobuf_2fstruct_2eproto, schemas,
+ file_default_instances, TableStruct_google_2fprotobuf_2fstruct_2eproto::offsets,
+ file_level_metadata_google_2fprotobuf_2fstruct_2eproto, 4, file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto, file_level_service_descriptors_google_2fprotobuf_2fstruct_2eproto,
};
void AddDescriptors_google_2fprotobuf_2fstruct_2eproto() {
@@ -167,7 +164,7 @@
static bool dynamic_init_dummy_google_2fprotobuf_2fstruct_2eproto = []() { AddDescriptors_google_2fprotobuf_2fstruct_2eproto(); return true; }();
PROTOBUF_NAMESPACE_OPEN
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* NullValue_descriptor() {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2fstruct_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fstruct_2eproto);
return file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto[0];
}
bool NullValue_IsValid(int value) {
@@ -189,7 +186,7 @@
MergeFromInternal(other);
}
::PROTOBUF_NAMESPACE_ID::Metadata Struct_FieldsEntry_DoNotUse::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fstruct_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fstruct_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fstruct_2eproto[0];
}
void Struct_FieldsEntry_DoNotUse::MergeFrom(
@@ -575,7 +572,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata Struct::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fstruct_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fstruct_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fstruct_2eproto[kIndexInFileMessages];
}
@@ -1224,7 +1221,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata Value::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fstruct_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fstruct_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fstruct_2eproto[kIndexInFileMessages];
}
@@ -1526,7 +1523,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata ListValue::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fstruct_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fstruct_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fstruct_2eproto[kIndexInFileMessages];
}
diff --git a/src/google/protobuf/timestamp.pb.cc b/src/google/protobuf/timestamp.pb.cc
index 6ec5991..3187af7 100644
--- a/src/google/protobuf/timestamp.pb.cc
+++ b/src/google/protobuf/timestamp.pb.cc
@@ -57,12 +57,6 @@
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_),
};
-static ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2ftimestamp_2eproto = {
- {}, AddDescriptors_google_2fprotobuf_2ftimestamp_2eproto, "google/protobuf/timestamp.proto", schemas,
- file_default_instances, TableStruct_google_2fprotobuf_2ftimestamp_2eproto::offsets,
- file_level_metadata_google_2fprotobuf_2ftimestamp_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2ftimestamp_2eproto, file_level_service_descriptors_google_2fprotobuf_2ftimestamp_2eproto,
-};
-
const char descriptor_table_protodef_google_2fprotobuf_2ftimestamp_2eproto[] =
"\n\037google/protobuf/timestamp.proto\022\017googl"
"e.protobuf\"+\n\tTimestamp\022\017\n\007seconds\030\001 \001(\003"
@@ -71,9 +65,12 @@
"obuf/ptypes/timestamp\370\001\001\242\002\003GPB\252\002\036Google."
"Protobuf.WellKnownTypesb\006proto3"
;
+static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2ftimestamp_2eproto_once;
static ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2ftimestamp_2eproto = {
- false, descriptor_table_protodef_google_2fprotobuf_2ftimestamp_2eproto,
- "google/protobuf/timestamp.proto", &assign_descriptors_table_google_2fprotobuf_2ftimestamp_2eproto, 231,
+ false, descriptor_table_protodef_google_2fprotobuf_2ftimestamp_2eproto, "google/protobuf/timestamp.proto", 231,
+ &descriptor_table_google_2fprotobuf_2ftimestamp_2eproto_once, AddDescriptors_google_2fprotobuf_2ftimestamp_2eproto, schemas,
+ file_default_instances, TableStruct_google_2fprotobuf_2ftimestamp_2eproto::offsets,
+ file_level_metadata_google_2fprotobuf_2ftimestamp_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2ftimestamp_2eproto, file_level_service_descriptors_google_2fprotobuf_2ftimestamp_2eproto,
};
void AddDescriptors_google_2fprotobuf_2ftimestamp_2eproto() {
@@ -419,7 +416,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata Timestamp::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2ftimestamp_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto);
return ::file_level_metadata_google_2fprotobuf_2ftimestamp_2eproto[kIndexInFileMessages];
}
diff --git a/src/google/protobuf/type.pb.cc b/src/google/protobuf/type.pb.cc
index d75b30a..5fddd13 100644
--- a/src/google/protobuf/type.pb.cc
+++ b/src/google/protobuf/type.pb.cc
@@ -195,12 +195,6 @@
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Option_default_instance_),
};
-static ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2ftype_2eproto = {
- {}, AddDescriptors_google_2fprotobuf_2ftype_2eproto, "google/protobuf/type.proto", schemas,
- file_default_instances, TableStruct_google_2fprotobuf_2ftype_2eproto::offsets,
- file_level_metadata_google_2fprotobuf_2ftype_2eproto, 5, file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto, file_level_service_descriptors_google_2fprotobuf_2ftype_2eproto,
-};
-
const char descriptor_table_protodef_google_2fprotobuf_2ftype_2eproto[] =
"\n\032google/protobuf/type.proto\022\017google.pro"
"tobuf\032\031google/protobuf/any.proto\032$google"
@@ -243,9 +237,12 @@
"oto/protobuf/ptype;ptype\370\001\001\242\002\003GPB\252\002\036Goog"
"le.Protobuf.WellKnownTypesb\006proto3"
;
+static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2ftype_2eproto_once;
static ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2ftype_2eproto = {
- false, descriptor_table_protodef_google_2fprotobuf_2ftype_2eproto,
- "google/protobuf/type.proto", &assign_descriptors_table_google_2fprotobuf_2ftype_2eproto, 1594,
+ false, descriptor_table_protodef_google_2fprotobuf_2ftype_2eproto, "google/protobuf/type.proto", 1594,
+ &descriptor_table_google_2fprotobuf_2ftype_2eproto_once, AddDescriptors_google_2fprotobuf_2ftype_2eproto, schemas,
+ file_default_instances, TableStruct_google_2fprotobuf_2ftype_2eproto::offsets,
+ file_level_metadata_google_2fprotobuf_2ftype_2eproto, 5, file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto, file_level_service_descriptors_google_2fprotobuf_2ftype_2eproto,
};
void AddDescriptors_google_2fprotobuf_2ftype_2eproto() {
@@ -266,7 +263,7 @@
static bool dynamic_init_dummy_google_2fprotobuf_2ftype_2eproto = []() { AddDescriptors_google_2fprotobuf_2ftype_2eproto(); return true; }();
PROTOBUF_NAMESPACE_OPEN
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Field_Kind_descriptor() {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2ftype_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto);
return file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[0];
}
bool Field_Kind_IsValid(int value) {
@@ -321,7 +318,7 @@
constexpr int Field::Kind_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Field_Cardinality_descriptor() {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2ftype_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto);
return file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[1];
}
bool Field_Cardinality_IsValid(int value) {
@@ -346,7 +343,7 @@
constexpr int Field::Cardinality_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Syntax_descriptor() {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2ftype_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto);
return file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[2];
}
bool Syntax_IsValid(int value) {
@@ -969,7 +966,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata Type::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2ftype_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2ftype_2eproto);
return ::file_level_metadata_google_2fprotobuf_2ftype_2eproto[kIndexInFileMessages];
}
@@ -1750,7 +1747,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata Field::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2ftype_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2ftype_2eproto);
return ::file_level_metadata_google_2fprotobuf_2ftype_2eproto[kIndexInFileMessages];
}
@@ -2302,7 +2299,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata Enum::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2ftype_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2ftype_2eproto);
return ::file_level_metadata_google_2fprotobuf_2ftype_2eproto[kIndexInFileMessages];
}
@@ -2713,7 +2710,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata EnumValue::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2ftype_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2ftype_2eproto);
return ::file_level_metadata_google_2fprotobuf_2ftype_2eproto[kIndexInFileMessages];
}
@@ -3102,7 +3099,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata Option::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2ftype_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2ftype_2eproto);
return ::file_level_metadata_google_2fprotobuf_2ftype_2eproto[kIndexInFileMessages];
}
diff --git a/src/google/protobuf/wrappers.pb.cc b/src/google/protobuf/wrappers.pb.cc
index bedf4e1..30675b3 100644
--- a/src/google/protobuf/wrappers.pb.cc
+++ b/src/google/protobuf/wrappers.pb.cc
@@ -264,12 +264,6 @@
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_BytesValue_default_instance_),
};
-static ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fwrappers_2eproto = {
- {}, AddDescriptors_google_2fprotobuf_2fwrappers_2eproto, "google/protobuf/wrappers.proto", schemas,
- file_default_instances, TableStruct_google_2fprotobuf_2fwrappers_2eproto::offsets,
- file_level_metadata_google_2fprotobuf_2fwrappers_2eproto, 9, file_level_enum_descriptors_google_2fprotobuf_2fwrappers_2eproto, file_level_service_descriptors_google_2fprotobuf_2fwrappers_2eproto,
-};
-
const char descriptor_table_protodef_google_2fprotobuf_2fwrappers_2eproto[] =
"\n\036google/protobuf/wrappers.proto\022\017google"
".protobuf\"\034\n\013DoubleValue\022\r\n\005value\030\001 \001(\001\""
@@ -284,9 +278,12 @@
"\242\002\003GPB\252\002\036Google.Protobuf.WellKnownTypesb"
"\006proto3"
;
+static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fwrappers_2eproto_once;
static ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fwrappers_2eproto = {
- false, descriptor_table_protodef_google_2fprotobuf_2fwrappers_2eproto,
- "google/protobuf/wrappers.proto", &assign_descriptors_table_google_2fprotobuf_2fwrappers_2eproto, 447,
+ false, descriptor_table_protodef_google_2fprotobuf_2fwrappers_2eproto, "google/protobuf/wrappers.proto", 447,
+ &descriptor_table_google_2fprotobuf_2fwrappers_2eproto_once, AddDescriptors_google_2fprotobuf_2fwrappers_2eproto, schemas,
+ file_default_instances, TableStruct_google_2fprotobuf_2fwrappers_2eproto::offsets,
+ file_level_metadata_google_2fprotobuf_2fwrappers_2eproto, 9, file_level_enum_descriptors_google_2fprotobuf_2fwrappers_2eproto, file_level_service_descriptors_google_2fprotobuf_2fwrappers_2eproto,
};
void AddDescriptors_google_2fprotobuf_2fwrappers_2eproto() {
@@ -590,7 +587,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata DoubleValue::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fwrappers_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fwrappers_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fwrappers_2eproto[kIndexInFileMessages];
}
@@ -876,7 +873,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata FloatValue::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fwrappers_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fwrappers_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fwrappers_2eproto[kIndexInFileMessages];
}
@@ -1164,7 +1161,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata Int64Value::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fwrappers_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fwrappers_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fwrappers_2eproto[kIndexInFileMessages];
}
@@ -1452,7 +1449,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata UInt64Value::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fwrappers_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fwrappers_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fwrappers_2eproto[kIndexInFileMessages];
}
@@ -1740,7 +1737,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata Int32Value::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fwrappers_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fwrappers_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fwrappers_2eproto[kIndexInFileMessages];
}
@@ -2028,7 +2025,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata UInt32Value::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fwrappers_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fwrappers_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fwrappers_2eproto[kIndexInFileMessages];
}
@@ -2314,7 +2311,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata BoolValue::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fwrappers_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fwrappers_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fwrappers_2eproto[kIndexInFileMessages];
}
@@ -2623,7 +2620,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata StringValue::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fwrappers_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fwrappers_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fwrappers_2eproto[kIndexInFileMessages];
}
@@ -2920,7 +2917,7 @@
}
::PROTOBUF_NAMESPACE_ID::Metadata BytesValue::GetMetadata() const {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fwrappers_2eproto);
+ ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fwrappers_2eproto);
return ::file_level_metadata_google_2fprotobuf_2fwrappers_2eproto[kIndexInFileMessages];
}