Sync from Piper @391414001
PROTOBUF_SYNC_PIPER
This commit is contained in:
parent
562fc946c7
commit
509aee4b8b
@ -1,3 +1,4 @@
|
||||
# These are fetched as external repositories.
|
||||
third_party/benchmark
|
||||
third_party/googletest
|
||||
_build/
|
||||
|
66
BUILD
66
BUILD
@ -4,7 +4,7 @@ load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
|
||||
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test", "objc_library", native_cc_proto_library = "cc_proto_library")
|
||||
load("@rules_proto//proto:defs.bzl", "proto_lang_toolchain", "proto_library")
|
||||
load("@rules_python//python:defs.bzl", "py_library")
|
||||
load("@rules_java//java:defs.bzl", "java_binary", "java_proto_library", "java_lite_proto_library")
|
||||
load("@rules_java//java:defs.bzl", "java_binary", "java_lite_proto_library", "java_proto_library")
|
||||
load(":cc_proto_blacklist_test.bzl", "cc_proto_blacklist_test")
|
||||
|
||||
licenses(["notice"])
|
||||
@ -39,7 +39,6 @@ MSVC_COPTS = [
|
||||
"/wd4334", # 'operator' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
|
||||
"/wd4355", # 'this' : used in base member initializer list
|
||||
"/wd4506", # no definition for inline function 'function'
|
||||
"/wd4514", # -Wno-unused-function
|
||||
"/wd4800", # 'type' : forcing value to bool 'true' or 'false' (performance warning)
|
||||
"/wd4996", # The compiler encountered a deprecated declaration.
|
||||
]
|
||||
@ -49,12 +48,9 @@ COPTS = select({
|
||||
"//conditions:default": [
|
||||
"-DHAVE_PTHREAD",
|
||||
"-DHAVE_ZLIB",
|
||||
"-Wmissing-field-initializers",
|
||||
"-Woverloaded-virtual",
|
||||
"-Wno-sign-compare",
|
||||
"-Wno-unused-function",
|
||||
# Prevents ISO C++ const string assignment warnings for pyext sources.
|
||||
"-Wno-write-strings",
|
||||
"-Wno-deprecated-declarations",
|
||||
],
|
||||
})
|
||||
|
||||
@ -139,6 +135,7 @@ cc_library(
|
||||
"src/google/protobuf/generated_message_table_driven_lite.cc",
|
||||
"src/google/protobuf/generated_message_util.cc",
|
||||
"src/google/protobuf/implicit_weak_message.cc",
|
||||
"src/google/protobuf/inlined_string_field.cc",
|
||||
"src/google/protobuf/io/coded_stream.cc",
|
||||
"src/google/protobuf/io/io_win32.cc",
|
||||
"src/google/protobuf/io/strtod.cc",
|
||||
@ -334,8 +331,8 @@ filegroup(
|
||||
|
||||
adapt_proto_library(
|
||||
name = "cc_wkt_protos_genproto",
|
||||
deps = [proto + "_proto" for proto in WELL_KNOWN_PROTO_MAP.keys()],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [proto + "_proto" for proto in WELL_KNOWN_PROTO_MAP.keys()],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
@ -366,13 +363,12 @@ cc_library(
|
||||
|
||||
[native_cc_proto_library(
|
||||
name = proto + "_cc_proto",
|
||||
deps = [proto + "_proto"],
|
||||
visibility = ["//visibility:private"],
|
||||
deps = [proto + "_proto"],
|
||||
) for proto in WELL_KNOWN_PROTO_MAP.keys()]
|
||||
|
||||
cc_proto_blacklist_test(
|
||||
name = "cc_proto_blacklist_test",
|
||||
deps = [proto + "_cc_proto" for proto in WELL_KNOWN_PROTO_MAP.keys()],
|
||||
tags = [
|
||||
# Exclude this target from wildcard expansion (//...). Due to
|
||||
# https://github.com/bazelbuild/bazel/issues/10590, this test has to
|
||||
@ -381,6 +377,7 @@ cc_proto_blacklist_test(
|
||||
# See also https://github.com/protocolbuffers/protobuf/pull/7096.
|
||||
"manual",
|
||||
],
|
||||
deps = [proto + "_cc_proto" for proto in WELL_KNOWN_PROTO_MAP.keys()],
|
||||
)
|
||||
|
||||
################################################################################
|
||||
@ -496,8 +493,8 @@ cc_binary(
|
||||
|
||||
filegroup(
|
||||
name = "testdata",
|
||||
visibility = ["//:__subpackages__"],
|
||||
srcs = glob(["src/google/protobuf/testdata/**/*"]),
|
||||
visibility = ["//:__subpackages__"],
|
||||
)
|
||||
|
||||
RELATIVE_LITE_TEST_PROTOS = [
|
||||
@ -594,9 +591,9 @@ GENERIC_TEST_PROTOS = ["src/" + s for s in GENERIC_RELATIVE_TEST_PROTOS]
|
||||
|
||||
proto_library(
|
||||
name = "generic_test_protos",
|
||||
visibility = ["//:__subpackages__"],
|
||||
strip_import_prefix = "src",
|
||||
srcs = LITE_TEST_PROTOS + GENERIC_TEST_PROTOS,
|
||||
strip_import_prefix = "src",
|
||||
visibility = ["//:__subpackages__"],
|
||||
deps = [
|
||||
"//:any_proto",
|
||||
"//:api_proto",
|
||||
@ -625,6 +622,7 @@ COMMON_TEST_SRCS = [
|
||||
# AUTOGEN(common_test_srcs)
|
||||
"src/google/protobuf/arena_test_util.cc",
|
||||
"src/google/protobuf/map_test_util.inc",
|
||||
"src/google/protobuf/reflection_tester.cc",
|
||||
"src/google/protobuf/test_util.cc",
|
||||
"src/google/protobuf/test_util.inc",
|
||||
"src/google/protobuf/testing/file.cc",
|
||||
@ -691,6 +689,7 @@ cc_test(
|
||||
"src/google/protobuf/dynamic_message_unittest.cc",
|
||||
"src/google/protobuf/extension_set_unittest.cc",
|
||||
"src/google/protobuf/generated_message_reflection_unittest.cc",
|
||||
"src/google/protobuf/inlined_string_field_unittest.cc",
|
||||
"src/google/protobuf/io/coded_stream_unittest.cc",
|
||||
"src/google/protobuf/io/io_win32_unittest.cc",
|
||||
"src/google/protobuf/io/printer_unittest.cc",
|
||||
@ -698,6 +697,7 @@ cc_test(
|
||||
"src/google/protobuf/io/zero_copy_stream_unittest.cc",
|
||||
"src/google/protobuf/map_field_test.cc",
|
||||
"src/google/protobuf/map_test.cc",
|
||||
"src/google/protobuf/map_test.inc",
|
||||
"src/google/protobuf/message_unittest.cc",
|
||||
"src/google/protobuf/message_unittest.inc",
|
||||
"src/google/protobuf/no_field_presence_test.cc",
|
||||
@ -737,6 +737,7 @@ cc_test(
|
||||
"src/google/protobuf/util/type_resolver_util_test.cc",
|
||||
"src/google/protobuf/well_known_types_unittest.cc",
|
||||
"src/google/protobuf/wire_format_unittest.cc",
|
||||
"src/google/protobuf/wire_format_unittest.inc",
|
||||
] + select({
|
||||
"//conditions:default": [
|
||||
# AUTOGEN(non_msvc_test_srcs)
|
||||
@ -744,7 +745,12 @@ cc_test(
|
||||
],
|
||||
":msvc": [],
|
||||
}),
|
||||
copts = COPTS,
|
||||
copts = COPTS + select({
|
||||
":msvc": [],
|
||||
"//conditions:default": [
|
||||
"-Wno-deprecated-declarations",
|
||||
],
|
||||
}),
|
||||
data = [
|
||||
":test_plugin",
|
||||
] + glob([
|
||||
@ -772,19 +778,19 @@ cc_test(
|
||||
|
||||
internal_gen_well_known_protos_java(
|
||||
name = "gen_well_known_protos_java",
|
||||
deps = [proto + "_proto" for proto in WELL_KNOWN_PROTO_MAP.keys()],
|
||||
visibility = [
|
||||
"//java:__subpackages__",
|
||||
],
|
||||
deps = [proto + "_proto" for proto in WELL_KNOWN_PROTO_MAP.keys()],
|
||||
)
|
||||
|
||||
internal_gen_well_known_protos_java(
|
||||
name = "gen_well_known_protos_javalite",
|
||||
deps = [proto + "_proto" for proto in LITE_WELL_KNOWN_PROTO_MAP.keys()],
|
||||
javalite = True,
|
||||
visibility = [
|
||||
"//java:__subpackages__",
|
||||
],
|
||||
deps = [proto + "_proto" for proto in LITE_WELL_KNOWN_PROTO_MAP.keys()],
|
||||
)
|
||||
|
||||
alias(
|
||||
@ -842,6 +848,8 @@ cc_binary(
|
||||
copts = COPTS + [
|
||||
"-DPYTHON_PROTO2_CPP_IMPL_V2",
|
||||
],
|
||||
linkshared = 1,
|
||||
linkstatic = 1,
|
||||
tags = [
|
||||
# Exclude this target from wildcard expansion (//...) because it may
|
||||
# not even be buildable. It will be built if it is needed according
|
||||
@ -849,8 +857,6 @@ cc_binary(
|
||||
# https://docs.bazel.build/versions/master/be/common-definitions.html#common-attributes
|
||||
"manual",
|
||||
],
|
||||
linkshared = 1,
|
||||
linkstatic = 1,
|
||||
deps = select({
|
||||
"//conditions:default": [],
|
||||
":use_fast_cpp_protos": ["//external:python_headers"],
|
||||
@ -873,6 +879,8 @@ cc_binary(
|
||||
"python/",
|
||||
"src/",
|
||||
],
|
||||
linkshared = 1,
|
||||
linkstatic = 1,
|
||||
tags = [
|
||||
# Exclude this target from wildcard expansion (//...) because it may
|
||||
# not even be buildable. It will be built if it is needed according
|
||||
@ -880,8 +888,6 @@ cc_binary(
|
||||
# https://docs.bazel.build/versions/master/be/common-definitions.html#common-attributes
|
||||
"manual",
|
||||
],
|
||||
linkshared = 1,
|
||||
linkstatic = 1,
|
||||
deps = [
|
||||
":protobuf",
|
||||
":proto_api",
|
||||
@ -1226,7 +1232,7 @@ java_proto_library(
|
||||
name = "test_messages_proto3_java_proto",
|
||||
visibility = [
|
||||
"//java:__subpackages__",
|
||||
],
|
||||
],
|
||||
deps = [":test_messages_proto3_proto"],
|
||||
)
|
||||
|
||||
@ -1247,11 +1253,11 @@ java_lite_proto_library(
|
||||
)
|
||||
|
||||
java_lite_proto_library(
|
||||
name = "conformance_java_proto_lite",
|
||||
visibility = [
|
||||
name = "conformance_java_proto_lite",
|
||||
visibility = [
|
||||
"//java:__subpackages__",
|
||||
],
|
||||
deps = [":conformance_proto"],
|
||||
],
|
||||
deps = [":conformance_proto"],
|
||||
)
|
||||
|
||||
java_lite_proto_library(
|
||||
@ -1265,10 +1271,10 @@ java_lite_proto_library(
|
||||
java_binary(
|
||||
name = "conformance_java",
|
||||
srcs = ["conformance/ConformanceJava.java"],
|
||||
main_class = "ConformanceJava",
|
||||
visibility = [
|
||||
"//java:__subpackages__",
|
||||
],
|
||||
main_class = "ConformanceJava",
|
||||
deps = [
|
||||
":conformance_java_proto",
|
||||
":test_messages_proto2_java_proto",
|
||||
@ -1281,16 +1287,16 @@ java_binary(
|
||||
java_binary(
|
||||
name = "conformance_java_lite",
|
||||
srcs = ["conformance/ConformanceJavaLite.java"],
|
||||
main_class = "ConformanceJavaLite",
|
||||
visibility = [
|
||||
"//java:__subpackages__",
|
||||
],
|
||||
main_class = "ConformanceJavaLite",
|
||||
deps = [
|
||||
":conformance_java_proto_lite",
|
||||
":test_messages_proto2_java_proto_lite",
|
||||
":test_messages_proto3_java_proto_lite",
|
||||
"//:protobuf_javalite",
|
||||
"//:protobuf_java_util",
|
||||
"//:protobuf_javalite",
|
||||
],
|
||||
)
|
||||
|
||||
@ -1301,3 +1307,9 @@ exports_files([
|
||||
"conformance/text_format_failure_list_java.txt",
|
||||
"conformance/text_format_failure_list_java_lite.txt",
|
||||
])
|
||||
|
||||
filegroup(
|
||||
name = "bzl_srcs",
|
||||
srcs = glob(["**/*.bzl"]),
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
34
CHANGES.txt
34
CHANGES.txt
@ -1,3 +1,37 @@
|
||||
Unreleased Changes (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
|
||||
C++
|
||||
* Better Smaller ByteSizeLong
|
||||
* Introduce event filters for inject_field_listener_events
|
||||
* Reduce memory usage of DescriptorPool
|
||||
* For lazy fields copy serialized form when allowed.
|
||||
* Re-introduce the InlinedStringField class
|
||||
* v2 access listener
|
||||
* Reduce padding in the proto's ExtensionRegistry map.
|
||||
* GetExtension performance optimizations
|
||||
* Make tracker a static variable rather than call static functions
|
||||
* Support extensions in field access listener
|
||||
* Annotate MergeFrom for field access listener
|
||||
* Fix incomplete types for field access listener
|
||||
* Add map_entry/new_map_entry to SpecificField in MessageDifferencer. They
|
||||
record the map items which are different in MessageDifferencer's reporter.
|
||||
* Reduce binary size due to fieldless proto messages
|
||||
* TextFormat: ParseInfoTree supports getting field end location in addition to
|
||||
start.
|
||||
* Fix repeated enum extension size in field listener
|
||||
* Enable Any Text Expansion for Descriptors::DebugString()
|
||||
* Switch from int{8,16,32,64} to int{8,16,32,64}_t
|
||||
|
||||
Java
|
||||
* Optimized FieldDescriptor.valueOf() to avoid array copying.
|
||||
* Removing deprecated TimeUtil class.
|
||||
* Add Durations.parseUnchecked(String) and Timestamps.parseUnchecked(String)
|
||||
* FieldMaskUtil: Add convenience method to mask the fields out of a given proto.
|
||||
|
||||
JavaScript
|
||||
* Optimize binary parsing of repeated float64
|
||||
* Fix for optimization when reading doubles from binary wire format
|
||||
* Replace toArray implementation with toJSON.
|
||||
|
||||
2021-06-04 version 3.17.3 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
|
||||
C++
|
||||
* Introduce FieldAccessListener.
|
||||
|
4
SECURITY.md
Normal file
4
SECURITY.md
Normal file
@ -0,0 +1,4 @@
|
||||
To report security concerns or vulnerabilities within protobuf, please use
|
||||
Google's official channel for reporting these.
|
||||
|
||||
https://www.google.com/appserve/security-bugs/m2/new
|
@ -19,22 +19,22 @@ add_custom_command(
|
||||
)
|
||||
|
||||
add_executable(conformance_test_runner
|
||||
${protobuf_source_dir}/conformance/conformance.pb.cc
|
||||
${protobuf_source_dir}/conformance/conformance_test.cc
|
||||
${protobuf_source_dir}/conformance/binary_json_conformance_suite.cc
|
||||
${protobuf_source_dir}/conformance/binary_json_conformance_suite.h
|
||||
${protobuf_source_dir}/conformance/conformance.pb.cc
|
||||
${protobuf_source_dir}/conformance/conformance_test.cc
|
||||
${protobuf_source_dir}/conformance/conformance_test_runner.cc
|
||||
${protobuf_source_dir}/conformance/third_party/jsoncpp/json.h
|
||||
${protobuf_source_dir}/conformance/third_party/jsoncpp/jsoncpp.cpp
|
||||
${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.pb.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/test_messages_proto2.pb.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.pb.cc
|
||||
)
|
||||
|
||||
add_executable(conformance_cpp
|
||||
${protobuf_source_dir}/conformance/conformance.pb.cc
|
||||
${protobuf_source_dir}/conformance/conformance_cpp.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.pb.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/test_messages_proto2.pb.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.pb.cc
|
||||
)
|
||||
|
||||
target_include_directories(
|
||||
|
@ -36,13 +36,13 @@ set(libprotobuf_lite_includes
|
||||
${protobuf_source_dir}/src/google/protobuf/extension_set.h
|
||||
${protobuf_source_dir}/src/google/protobuf/generated_message_util.h
|
||||
${protobuf_source_dir}/src/google/protobuf/implicit_weak_message.h
|
||||
${protobuf_source_dir}/src/google/protobuf/parse_context.h
|
||||
${protobuf_source_dir}/src/google/protobuf/io/coded_stream.h
|
||||
${protobuf_source_dir}/src/google/protobuf/io/strtod.h
|
||||
${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream.h
|
||||
${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl.h
|
||||
${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl_lite.h
|
||||
${protobuf_source_dir}/src/google/protobuf/message_lite.h
|
||||
${protobuf_source_dir}/src/google/protobuf/parse_context.h
|
||||
${protobuf_source_dir}/src/google/protobuf/repeated_field.h
|
||||
${protobuf_source_dir}/src/google/protobuf/stubs/bytestream.h
|
||||
${protobuf_source_dir}/src/google/protobuf/stubs/common.h
|
||||
|
@ -11,8 +11,8 @@ set(libprotobuf_files
|
||||
${protobuf_source_dir}/src/google/protobuf/dynamic_message.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/empty.pb.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/extension_set_heavy.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/field_access_listener.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/field_mask.pb.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/generated_message_bases.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/generated_message_reflection.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/generated_message_table_driven.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/io/gzip_stream.cc
|
||||
@ -68,6 +68,7 @@ set(libprotobuf_includes
|
||||
${protobuf_source_dir}/src/google/protobuf/empty.pb.h
|
||||
${protobuf_source_dir}/src/google/protobuf/field_access_listener.h
|
||||
${protobuf_source_dir}/src/google/protobuf/field_mask.pb.h
|
||||
${protobuf_source_dir}/src/google/protobuf/generated_message_bases.h
|
||||
${protobuf_source_dir}/src/google/protobuf/generated_message_reflection.h
|
||||
${protobuf_source_dir}/src/google/protobuf/io/gzip_stream.h
|
||||
${protobuf_source_dir}/src/google/protobuf/io/printer.h
|
||||
|
@ -132,6 +132,7 @@ set(tests_files
|
||||
${protobuf_source_dir}/src/google/protobuf/arena_unittest.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/arenastring_unittest.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/compiler/annotation_test_util.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/compiler/command_line_interface_unittest.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_move_unittest.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc
|
||||
@ -203,21 +204,12 @@ set(tests_files
|
||||
${protobuf_source_dir}/src/google/protobuf/wire_format_unittest.inc
|
||||
)
|
||||
|
||||
set(non_msvc_tests_files
|
||||
${protobuf_source_dir}/src/google/protobuf/compiler/command_line_interface_unittest.cc
|
||||
)
|
||||
|
||||
set(all_tests_files
|
||||
${tests_files}
|
||||
${non_msvc_tests_files}
|
||||
)
|
||||
|
||||
if(protobuf_ABSOLUTE_TEST_PLUGIN_PATH)
|
||||
add_compile_options(-DGOOGLE_PROTOBUF_TEST_PLUGIN_PATH="$<TARGET_FILE:test_plugin>")
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
set_source_files_properties(${all_tests_files} PROPERTIES COMPILE_FLAGS "-Wno-narrowing")
|
||||
set_source_files_properties(${tests_files} PROPERTIES COMPILE_FLAGS "-Wno-narrowing")
|
||||
|
||||
# required for tests on MinGW Win64
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
@ -227,14 +219,14 @@ if(MINGW)
|
||||
|
||||
endif()
|
||||
|
||||
add_executable(tests ${all_tests_files} ${common_test_files} ${tests_proto_files} ${lite_test_proto_files})
|
||||
add_executable(tests ${tests_files} ${common_test_files} ${tests_proto_files} ${lite_test_proto_files})
|
||||
target_link_libraries(tests libprotoc libprotobuf gmock_main)
|
||||
|
||||
set(test_plugin_files
|
||||
${protobuf_source_dir}/src/google/protobuf/compiler/mock_code_generator.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/compiler/test_plugin.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/testing/file.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/testing/file.h
|
||||
${protobuf_source_dir}/src/google/protobuf/compiler/test_plugin.cc
|
||||
)
|
||||
|
||||
add_executable(test_plugin ${test_plugin_files})
|
||||
|
@ -242,6 +242,7 @@ junit_tests(
|
||||
":test_util",
|
||||
"//external:easymock",
|
||||
"//external:easymock_classextension",
|
||||
"//external:guava",
|
||||
"//external:junit",
|
||||
"//external:truth",
|
||||
]
|
||||
|
@ -832,8 +832,6 @@ final class FieldSet<T extends FieldSet.FieldDescriptorLite<T>> {
|
||||
*/
|
||||
static int computeElementSizeNoTag(final WireFormat.FieldType type, final Object value) {
|
||||
switch (type) {
|
||||
// Note: Minor violation of 80-char limit rule here because this would
|
||||
// actually be harder to read if we wrapped the lines.
|
||||
case DOUBLE:
|
||||
return CodedOutputStream.computeDoubleSizeNoTag((Double) value);
|
||||
case FLOAT:
|
||||
|
@ -95,6 +95,7 @@
|
||||
<resource>
|
||||
<directory>${basedir}/../kotlin/src/main/kotlin/com/google/protobuf</directory>
|
||||
<includes>
|
||||
<include>ByteStrings.kt</include>
|
||||
<include>DslList.kt</include>
|
||||
<include>DslMap.kt</include>
|
||||
<include>DslProxy.kt</include>
|
||||
|
@ -50,6 +50,7 @@ junit_tests(
|
||||
deps = [
|
||||
":lite",
|
||||
"//external:junit",
|
||||
"//external:truth",
|
||||
"//java/core:generic_test_protos_java_proto_lite",
|
||||
"//java/core:java_test_protos_java_proto_lite",
|
||||
"//java/core:test_util_lite",
|
||||
|
@ -23,7 +23,7 @@ cd $(dirname $0)/../../..
|
||||
git submodule update --init --recursive
|
||||
|
||||
trap print_test_logs EXIT
|
||||
bazel test --copt=-Werror --host_copt=-Werror \
|
||||
bazel test -k --copt=-Werror --host_copt=-Werror \
|
||||
//:build_files_updated_unittest \
|
||||
//java:tests \
|
||||
//:protoc \
|
||||
|
@ -46,8 +46,6 @@
|
||||
<file baseinstalldir="/" name="protobuf.c" role="src"/>
|
||||
<file baseinstalldir="/" name="protobuf.h" role="src"/>
|
||||
<file baseinstalldir="/" name="wkt.inc" role="src"/>
|
||||
<file baseinstalldir="/" name="third_party/wyhash/wyhash.h" role="src"/>
|
||||
<file baseinstalldir="/" name="third_party/wyhash/LICENSE" role="doc"/>
|
||||
<file baseinstalldir="/" name="LICENSE" role="doc"/>
|
||||
</dir>
|
||||
</contents>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -168,7 +168,7 @@
|
||||
|
||||
/* Configure whether fasttable is switched on or not. *************************/
|
||||
|
||||
#if defined(__has_attribute)
|
||||
#ifdef __has_attribute
|
||||
#define UPB_HAS_ATTRIBUTE(x) __has_attribute(x)
|
||||
#else
|
||||
#define UPB_HAS_ATTRIBUTE(x) 0
|
||||
@ -636,6 +636,48 @@ void upb_msg_addunknown(upb_msg *msg, const char *data, size_t len,
|
||||
/* Returns a reference to the message's unknown data. */
|
||||
const char *upb_msg_getunknown(const upb_msg *msg, size_t *len);
|
||||
|
||||
/** upb_extreg *******************************************************************/
|
||||
|
||||
/* Extension registry: a dynamic data structure that stores a map of:
|
||||
* (upb_msglayout, number) -> extension info
|
||||
*
|
||||
* upb_decode() uses upb_extreg to look up extensions while parsing binary
|
||||
* format.
|
||||
*
|
||||
* upb_extreg is part of the mini-table (msglayout) family of objects. Like all
|
||||
* mini-table objects, it is suitable for reflection-less builds that do not
|
||||
* want to expose names into the binary.
|
||||
*
|
||||
* Unlike most mini-table types, upb_extreg requires dynamic memory allocation
|
||||
* and dynamic initialization:
|
||||
* * If reflection is being used, then upb_symtab will construct an appropriate
|
||||
* upb_extreg automatically.
|
||||
* * For a mini-table only build, the user must manually construct the
|
||||
* upb_extreg and populate it with all of the extensions the user cares about.
|
||||
* * A third alternative is to manually unpack relevant extensions after the
|
||||
* main parse is complete, similar to how Any works. This is perhaps the
|
||||
* nicest solution from the perspective of reducing dependencies, avoiding
|
||||
* dynamic memory allocation, and avoiding the need to parse uninteresting
|
||||
* extensions. The downsides are:
|
||||
* (1) parse errors are not caught during the main parse
|
||||
* (2) the CPU hit of parsing comes during access, which could cause an
|
||||
* undesirable stutter in application performance.
|
||||
*
|
||||
* Users cannot directly get or put into this map. Users can only add the
|
||||
* extensions from a generated module and pass the extension registry to the
|
||||
* binary decoder.
|
||||
*
|
||||
* A upb_symtab provides a upb_extreg, so any users who use reflection do not
|
||||
* need to populate a upb_extreg directly.
|
||||
*/
|
||||
|
||||
struct upb_extreg;
|
||||
typedef struct upb_extreg upb_extreg;
|
||||
|
||||
/* Creates a upb_extreg in the given arena. The arena must outlive any use of
|
||||
* the extreg. */
|
||||
upb_extreg *upb_extreg_new(upb_arena *arena);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
@ -657,12 +699,13 @@ enum {
|
||||
#define UPB_DECODE_MAXDEPTH(depth) ((depth) << 16)
|
||||
|
||||
bool _upb_decode(const char *buf, size_t size, upb_msg *msg,
|
||||
const upb_msglayout *l, upb_arena *arena, int options);
|
||||
const upb_msglayout *l, const upb_extreg *extreg, int options,
|
||||
upb_arena *arena);
|
||||
|
||||
UPB_INLINE
|
||||
bool upb_decode(const char *buf, size_t size, upb_msg *msg,
|
||||
const upb_msglayout *l, upb_arena *arena) {
|
||||
return _upb_decode(buf, size, msg, l, arena, 0);
|
||||
return _upb_decode(buf, size, msg, l, NULL, 0, arena);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -1047,9 +1090,34 @@ typedef struct {
|
||||
int16_t presence; /* If >0, hasbit_index. If <0, ~oneof_index. */
|
||||
uint16_t submsg_index; /* undefined if descriptortype != MESSAGE or GROUP. */
|
||||
uint8_t descriptortype;
|
||||
uint8_t label; /* google.protobuf.Label or _UPB_LABEL_* above. */
|
||||
int8_t mode; /* upb_fieldmode, with flags from upb_labelflags */
|
||||
} upb_msglayout_field;
|
||||
|
||||
typedef enum {
|
||||
_UPB_MODE_MAP = 0,
|
||||
_UPB_MODE_ARRAY = 1,
|
||||
_UPB_MODE_SCALAR = 2,
|
||||
} upb_fieldmode;
|
||||
|
||||
/* Extra flags on the mode field. */
|
||||
enum upb_labelflags {
|
||||
_UPB_MODE_IS_PACKED = 4,
|
||||
};
|
||||
|
||||
UPB_INLINE upb_fieldmode _upb_getmode(const upb_msglayout_field *field) {
|
||||
return (upb_fieldmode)(field->mode & 3);
|
||||
}
|
||||
|
||||
UPB_INLINE bool _upb_repeated_or_map(const upb_msglayout_field *field) {
|
||||
/* This works because upb_fieldmode has no value 3. */
|
||||
return !(field->mode & _UPB_MODE_SCALAR);
|
||||
}
|
||||
|
||||
UPB_INLINE bool _upb_issubmsg(const upb_msglayout_field *field) {
|
||||
return field->descriptortype == UPB_DTYPE_MESSAGE ||
|
||||
field->descriptortype == UPB_DTYPE_GROUP;
|
||||
}
|
||||
|
||||
struct upb_decstate;
|
||||
struct upb_msglayout;
|
||||
|
||||
@ -1070,27 +1138,65 @@ struct upb_msglayout {
|
||||
uint16_t size;
|
||||
uint16_t field_count;
|
||||
bool extendable;
|
||||
uint8_t dense_below;
|
||||
uint8_t table_mask;
|
||||
/* To constant-initialize the tables of variable length, we need a flexible
|
||||
* array member, and we need to compile in C99 mode. */
|
||||
_upb_fasttable_entry fasttable[];
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
upb_msglayout_field field;
|
||||
const upb_msglayout *extendee;
|
||||
const upb_msglayout *submsg; /* NULL for non-submessage fields. */
|
||||
} upb_msglayout_ext;
|
||||
|
||||
/** upb_extreg ****************************************************************/
|
||||
|
||||
/* Adds the given extension info for message type |l| and field number |num|
|
||||
* into the registry. Returns false if this message type and field number were
|
||||
* already in the map, or if memory allocation fails. */
|
||||
bool _upb_extreg_add(upb_extreg *r, const upb_msglayout_ext *e, size_t count);
|
||||
|
||||
/* Looks up the extension (if any) defined for message type |l| and field
|
||||
* number |num|. If an extension was found, copies the field info into |*ext|
|
||||
* and returns true. Otherwise returns false. */
|
||||
const upb_msglayout_field *_upb_extreg_get(const upb_extreg *r,
|
||||
const upb_msglayout *l,
|
||||
uint32_t num);
|
||||
|
||||
/** upb_msg *******************************************************************/
|
||||
|
||||
/* Internal members of a upb_msg. We can change this without breaking binary
|
||||
* compatibility. We put these before the user's data. The user's upb_msg*
|
||||
* points after the upb_msg_internal. */
|
||||
/* Internal members of a upb_msg that track unknown fields and/or extensions.
|
||||
* We can change this without breaking binary compatibility. We put these
|
||||
* before the user's data. The user's upb_msg* points after the
|
||||
* upb_msg_internal. */
|
||||
|
||||
typedef struct {
|
||||
uint32_t len;
|
||||
/* Total size of this structure, including the data that follows.
|
||||
* Must be aligned to 8, which is alignof(upb_msg_ext) */
|
||||
uint32_t size;
|
||||
/* Data follows. */
|
||||
} upb_msg_unknowndata;
|
||||
|
||||
/* Used when a message is not extendable. */
|
||||
/* Offsets relative to the beginning of this structure.
|
||||
*
|
||||
* Unknown data grows forward from the beginning to unknown_end.
|
||||
* Extension data grows backward from size to ext_begin.
|
||||
* When the two meet, we're out of data and have to realloc.
|
||||
*
|
||||
* If we imagine that the final member of this struct is:
|
||||
* char data[size - overhead]; // overhead = sizeof(upb_msg_internaldata)
|
||||
*
|
||||
* Then we have:
|
||||
* unknown data: data[0 .. (unknown_end - overhead)]
|
||||
* extensions data: data[(ext_begin - overhead) .. (size - overhead)] */
|
||||
uint32_t unknown_end;
|
||||
uint32_t ext_begin;
|
||||
/* Data follows, as if there were an array:
|
||||
* char data[size - sizeof(upb_msg_internaldata)]; */
|
||||
} upb_msg_internaldata;
|
||||
|
||||
typedef struct {
|
||||
upb_msg_unknowndata *unknown;
|
||||
upb_msg_internaldata *internal;
|
||||
} upb_msg_internal;
|
||||
|
||||
/* Maps upb_fieldtype_t -> memory size. */
|
||||
@ -1129,6 +1235,35 @@ void _upb_msg_discardunknown_shallow(upb_msg *msg);
|
||||
bool _upb_msg_addunknown(upb_msg *msg, const char *data, size_t len,
|
||||
upb_arena *arena);
|
||||
|
||||
/** upb_msg_ext ***************************************************************/
|
||||
|
||||
/* The internal representation of an extension is self-describing: it contains
|
||||
* enough information that we can serialize it to binary format without needing
|
||||
* to look it up in a registry. */
|
||||
typedef struct {
|
||||
const upb_msglayout_ext *ext;
|
||||
union {
|
||||
upb_strview str;
|
||||
void *ptr;
|
||||
double dbl;
|
||||
char scalar_data[8];
|
||||
} data;
|
||||
} upb_msg_ext;
|
||||
|
||||
/* Adds the given extension data to the given message. The returned extension will
|
||||
* have its "ext" member initialized according to |ext|. */
|
||||
upb_msg_ext *_upb_msg_getorcreateext(upb_msg *msg, const upb_msglayout_ext *ext,
|
||||
upb_arena *arena);
|
||||
|
||||
/* Returns an array of extensions for this message. Note: the array is
|
||||
* ordered in reverse relative to the order of creation. */
|
||||
const upb_msg_ext *_upb_msg_getexts(const upb_msg *msg, size_t *count);
|
||||
|
||||
/* Returns an extension for the given field number, or NULL if no extension
|
||||
* exists for this field number. */
|
||||
const upb_msg_ext *_upb_msg_getext(const upb_msg *msg,
|
||||
const upb_msglayout_ext *ext);
|
||||
|
||||
/** Hasbit access *************************************************************/
|
||||
|
||||
UPB_INLINE bool _upb_hasbit(const upb_msg *msg, size_t idx) {
|
||||
@ -1192,14 +1327,6 @@ UPB_INLINE bool _upb_has_submsg_nohasbit(const upb_msg *msg, size_t ofs) {
|
||||
return *UPB_PTR_AT(msg, ofs, const upb_msg*) != NULL;
|
||||
}
|
||||
|
||||
UPB_INLINE bool _upb_isrepeated(const upb_msglayout_field *field) {
|
||||
return (field->label & 3) == UPB_LABEL_REPEATED;
|
||||
}
|
||||
|
||||
UPB_INLINE bool _upb_repeated_or_map(const upb_msglayout_field *field) {
|
||||
return field->label >= UPB_LABEL_REPEATED;
|
||||
}
|
||||
|
||||
/** upb_array *****************************************************************/
|
||||
|
||||
/* Our internal representation for repeated fields. */
|
||||
@ -2121,13 +2248,19 @@ UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_
|
||||
UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_FileDescriptorSet *ret = google_protobuf_FileDescriptorSet_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_FileDescriptorSet_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_FileDescriptorSet_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_FileDescriptorSet *ret = google_protobuf_FileDescriptorSet_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_FileDescriptorSet_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_FileDescriptorSet_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_FileDescriptorSet_serialize(const google_protobuf_FileDescriptorSet *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_FileDescriptorSet_msginit, arena, len);
|
||||
@ -2158,13 +2291,19 @@ UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorPr
|
||||
UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_FileDescriptorProto *ret = google_protobuf_FileDescriptorProto_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_FileDescriptorProto_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_FileDescriptorProto_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_FileDescriptorProto *ret = google_protobuf_FileDescriptorProto_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_FileDescriptorProto_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_FileDescriptorProto_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_FileDescriptorProto_serialize(const google_protobuf_FileDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_FileDescriptorProto_msginit, arena, len);
|
||||
@ -2321,13 +2460,19 @@ UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_new(
|
||||
UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_DescriptorProto *ret = google_protobuf_DescriptorProto_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_DescriptorProto *ret = google_protobuf_DescriptorProto_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_DescriptorProto_serialize(const google_protobuf_DescriptorProto *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_DescriptorProto_msginit, arena, len);
|
||||
@ -2480,13 +2625,19 @@ UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_Descr
|
||||
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_DescriptorProto_ExtensionRange *ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ExtensionRange_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ExtensionRange_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_DescriptorProto_ExtensionRange *ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ExtensionRange_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ExtensionRange_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_DescriptorProto_ExtensionRange_serialize(const google_protobuf_DescriptorProto_ExtensionRange *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_DescriptorProto_ExtensionRange_msginit, arena, len);
|
||||
@ -2529,13 +2680,19 @@ UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_Descri
|
||||
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_DescriptorProto_ReservedRange *ret = google_protobuf_DescriptorProto_ReservedRange_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ReservedRange_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ReservedRange_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_DescriptorProto_ReservedRange *ret = google_protobuf_DescriptorProto_ReservedRange_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ReservedRange_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ReservedRange_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_DescriptorProto_ReservedRange_serialize(const google_protobuf_DescriptorProto_ReservedRange *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_DescriptorProto_ReservedRange_msginit, arena, len);
|
||||
@ -2563,13 +2720,19 @@ UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRange
|
||||
UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_ExtensionRangeOptions *ret = google_protobuf_ExtensionRangeOptions_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_ExtensionRangeOptions_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_ExtensionRangeOptions_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_ExtensionRangeOptions *ret = google_protobuf_ExtensionRangeOptions_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_ExtensionRangeOptions_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_ExtensionRangeOptions_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_ExtensionRangeOptions_serialize(const google_protobuf_ExtensionRangeOptions *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_ExtensionRangeOptions_msginit, arena, len);
|
||||
@ -2600,13 +2763,19 @@ UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptor
|
||||
UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_FieldDescriptorProto *ret = google_protobuf_FieldDescriptorProto_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_FieldDescriptorProto_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_FieldDescriptorProto_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_FieldDescriptorProto *ret = google_protobuf_FieldDescriptorProto_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_FieldDescriptorProto_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_FieldDescriptorProto_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_FieldDescriptorProto_serialize(const google_protobuf_FieldDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_FieldDescriptorProto_msginit, arena, len);
|
||||
@ -2697,13 +2866,19 @@ UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptor
|
||||
UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_OneofDescriptorProto *ret = google_protobuf_OneofDescriptorProto_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_OneofDescriptorProto_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_OneofDescriptorProto_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_OneofDescriptorProto *ret = google_protobuf_OneofDescriptorProto_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_OneofDescriptorProto_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_OneofDescriptorProto_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_OneofDescriptorProto_serialize(const google_protobuf_OneofDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_OneofDescriptorProto_msginit, arena, len);
|
||||
@ -2740,13 +2915,19 @@ UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorPr
|
||||
UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_EnumDescriptorProto *ret = google_protobuf_EnumDescriptorProto_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_EnumDescriptorProto *ret = google_protobuf_EnumDescriptorProto_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_EnumDescriptorProto_serialize(const google_protobuf_EnumDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_EnumDescriptorProto_msginit, arena, len);
|
||||
@ -2824,13 +3005,19 @@ UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobu
|
||||
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_EnumDescriptorProto_EnumReservedRange *ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_EnumDescriptorProto_EnumReservedRange *ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena, len);
|
||||
@ -2858,13 +3045,19 @@ UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDe
|
||||
UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_EnumValueDescriptorProto *ret = google_protobuf_EnumValueDescriptorProto_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumValueDescriptorProto_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_EnumValueDescriptorProto_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_EnumValueDescriptorProto *ret = google_protobuf_EnumValueDescriptorProto_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_EnumValueDescriptorProto_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_EnumValueDescriptorProto_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_EnumValueDescriptorProto_serialize(const google_protobuf_EnumValueDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_EnumValueDescriptorProto_msginit, arena, len);
|
||||
@ -2907,13 +3100,19 @@ UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescri
|
||||
UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_ServiceDescriptorProto *ret = google_protobuf_ServiceDescriptorProto_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_ServiceDescriptorProto_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_ServiceDescriptorProto_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_ServiceDescriptorProto *ret = google_protobuf_ServiceDescriptorProto_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_ServiceDescriptorProto_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_ServiceDescriptorProto_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_ServiceDescriptorProto_serialize(const google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_ServiceDescriptorProto_msginit, arena, len);
|
||||
@ -2965,13 +3164,19 @@ UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescript
|
||||
UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_MethodDescriptorProto *ret = google_protobuf_MethodDescriptorProto_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_MethodDescriptorProto_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_MethodDescriptorProto_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_MethodDescriptorProto *ret = google_protobuf_MethodDescriptorProto_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_MethodDescriptorProto_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_MethodDescriptorProto_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_MethodDescriptorProto_serialize(const google_protobuf_MethodDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_MethodDescriptorProto_msginit, arena, len);
|
||||
@ -3032,13 +3237,19 @@ UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_new(upb_aren
|
||||
UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_FileOptions *ret = google_protobuf_FileOptions_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_FileOptions_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_FileOptions_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_FileOptions *ret = google_protobuf_FileOptions_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_FileOptions_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_FileOptions_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_FileOptions_serialize(const google_protobuf_FileOptions *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_FileOptions_msginit, arena, len);
|
||||
@ -3189,13 +3400,19 @@ UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_new(up
|
||||
UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_MessageOptions *ret = google_protobuf_MessageOptions_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_MessageOptions_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_MessageOptions_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_MessageOptions *ret = google_protobuf_MessageOptions_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_MessageOptions_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_MessageOptions_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_MessageOptions_serialize(const google_protobuf_MessageOptions *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_MessageOptions_msginit, arena, len);
|
||||
@ -3250,13 +3467,19 @@ UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_new(upb_ar
|
||||
UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_FieldOptions *ret = google_protobuf_FieldOptions_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_FieldOptions_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_FieldOptions_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_FieldOptions *ret = google_protobuf_FieldOptions_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_FieldOptions_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_FieldOptions_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_FieldOptions_serialize(const google_protobuf_FieldOptions *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_FieldOptions_msginit, arena, len);
|
||||
@ -3323,13 +3546,19 @@ UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_new(upb_ar
|
||||
UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_OneofOptions *ret = google_protobuf_OneofOptions_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_OneofOptions_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_OneofOptions_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_OneofOptions *ret = google_protobuf_OneofOptions_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_OneofOptions_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_OneofOptions_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_OneofOptions_serialize(const google_protobuf_OneofOptions *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_OneofOptions_msginit, arena, len);
|
||||
@ -3360,13 +3589,19 @@ UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_new(upb_aren
|
||||
UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_EnumOptions *ret = google_protobuf_EnumOptions_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumOptions_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_EnumOptions_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_EnumOptions *ret = google_protobuf_EnumOptions_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_EnumOptions_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_EnumOptions_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_EnumOptions_serialize(const google_protobuf_EnumOptions *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_EnumOptions_msginit, arena, len);
|
||||
@ -3409,13 +3644,19 @@ UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_ne
|
||||
UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_EnumValueOptions *ret = google_protobuf_EnumValueOptions_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumValueOptions_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_EnumValueOptions_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_EnumValueOptions *ret = google_protobuf_EnumValueOptions_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_EnumValueOptions_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_EnumValueOptions_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_EnumValueOptions_serialize(const google_protobuf_EnumValueOptions *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_EnumValueOptions_msginit, arena, len);
|
||||
@ -3452,13 +3693,19 @@ UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_new(up
|
||||
UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_ServiceOptions *ret = google_protobuf_ServiceOptions_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_ServiceOptions_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_ServiceOptions_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_ServiceOptions *ret = google_protobuf_ServiceOptions_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_ServiceOptions_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_ServiceOptions_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_ServiceOptions_serialize(const google_protobuf_ServiceOptions *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_ServiceOptions_msginit, arena, len);
|
||||
@ -3495,13 +3742,19 @@ UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_new(upb_
|
||||
UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_MethodOptions *ret = google_protobuf_MethodOptions_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_MethodOptions_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_MethodOptions_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_MethodOptions *ret = google_protobuf_MethodOptions_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_MethodOptions_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_MethodOptions_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_MethodOptions_serialize(const google_protobuf_MethodOptions *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_MethodOptions_msginit, arena, len);
|
||||
@ -3544,13 +3797,19 @@ UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOpt
|
||||
UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_UninterpretedOption *ret = google_protobuf_UninterpretedOption_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_UninterpretedOption *ret = google_protobuf_UninterpretedOption_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_UninterpretedOption_serialize(const google_protobuf_UninterpretedOption *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_UninterpretedOption_msginit, arena, len);
|
||||
@ -3617,13 +3876,19 @@ UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_Uninter
|
||||
UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_UninterpretedOption_NamePart *ret = google_protobuf_UninterpretedOption_NamePart_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_NamePart_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_NamePart_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_UninterpretedOption_NamePart *ret = google_protobuf_UninterpretedOption_NamePart_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_NamePart_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_NamePart_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_UninterpretedOption_NamePart_serialize(const google_protobuf_UninterpretedOption_NamePart *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_UninterpretedOption_NamePart_msginit, arena, len);
|
||||
@ -3651,13 +3916,19 @@ UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_new(up
|
||||
UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_SourceCodeInfo *ret = google_protobuf_SourceCodeInfo_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_SourceCodeInfo *ret = google_protobuf_SourceCodeInfo_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_SourceCodeInfo_serialize(const google_protobuf_SourceCodeInfo *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_SourceCodeInfo_msginit, arena, len);
|
||||
@ -3688,13 +3959,19 @@ UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeIn
|
||||
UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_SourceCodeInfo_Location *ret = google_protobuf_SourceCodeInfo_Location_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_Location_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_Location_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_SourceCodeInfo_Location *ret = google_protobuf_SourceCodeInfo_Location_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_Location_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_Location_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_SourceCodeInfo_Location_serialize(const google_protobuf_SourceCodeInfo_Location *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_SourceCodeInfo_Location_msginit, arena, len);
|
||||
@ -3755,13 +4032,19 @@ UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_
|
||||
UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_GeneratedCodeInfo *ret = google_protobuf_GeneratedCodeInfo_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_GeneratedCodeInfo *ret = google_protobuf_GeneratedCodeInfo_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_GeneratedCodeInfo_serialize(const google_protobuf_GeneratedCodeInfo *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_msginit, arena, len);
|
||||
@ -3792,13 +4075,19 @@ UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_Generat
|
||||
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_GeneratedCodeInfo_Annotation *ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_GeneratedCodeInfo_Annotation *ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_GeneratedCodeInfo_Annotation_serialize(const google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena, len);
|
||||
|
@ -1,19 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -ex
|
||||
|
||||
cd `dirname $0`
|
||||
|
||||
./prepare_c_extension.sh
|
||||
|
||||
if ../src/protoc --help > /dev/null; then
|
||||
PROTOC=src/protoc
|
||||
else
|
||||
# Bazel seems to be creating a problematic symlink in
|
||||
# _build/out/external/com_google_protobuf, so we remove the _build directory
|
||||
# before building protoc.
|
||||
(cd .. && bazel build -c opt :protoc)
|
||||
PROTOC=bazel-bin/protoc
|
||||
fi
|
||||
|
||||
|
||||
if [[ -d tmp && -z $(find tests/proto ../$PROTOC -newer tmp) ]]; then
|
||||
# Generated protos are already present and up to date, so we can skip protoc.
|
||||
#
|
||||
|
@ -1,20 +0,0 @@
|
||||
|
||||
cd $(dirname $0)
|
||||
|
||||
if [[ -f ext/google/protobuf/third_party/wyhash/wyhash.h && -z $(find ../third_party/wyhash -newer ext/google/protobuf/third_party) ]]; then
|
||||
# Generated protos are already present and up to date, so we can skip protoc.
|
||||
#
|
||||
# Protoc is very fast, but sometimes it is not available (like if we haven't
|
||||
# built it in Docker). Skipping it helps us proceed in this case.
|
||||
echo "wyhash is up to date, skipping."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# wyhash has to live in the base third_party directory.
|
||||
# We copy it into the ext/google/protobuf directory for the build
|
||||
# (and for the release to PECL).
|
||||
rm -rf ext/google/protobuf/third_party
|
||||
mkdir -p ext/google/protobuf/third_party/wyhash
|
||||
cp ../third_party/wyhash/* ext/google/protobuf/third_party/wyhash
|
||||
|
||||
echo "Copied wyhash from ../third_party -> ext/google/protobuf/third_party"
|
@ -4,7 +4,6 @@ set -e
|
||||
|
||||
cd $(dirname $0)
|
||||
|
||||
../prepare_c_extension.sh
|
||||
pushd ../ext/google/protobuf > /dev/null
|
||||
|
||||
CONFIGURE_OPTIONS=("./configure" "--with-php-config=$(which php-config)")
|
||||
|
@ -913,8 +913,9 @@ static int SetContainingType(PyBaseDescriptor *self, PyObject *value,
|
||||
}
|
||||
|
||||
static PyObject* GetExtensionScope(PyBaseDescriptor *self, void *closure) {
|
||||
const auto* desc = _GetDescriptor(self);
|
||||
const Descriptor* extension_scope =
|
||||
_GetDescriptor(self)->extension_scope();
|
||||
desc->is_extension() ? desc->extension_scope() : nullptr;
|
||||
if (extension_scope) {
|
||||
return PyMessageDescriptor_FromDescriptor(extension_scope);
|
||||
} else {
|
||||
|
@ -78,12 +78,6 @@ if RUBY_PLATFORM == "java"
|
||||
system("mvn --batch-mode package")
|
||||
end
|
||||
else
|
||||
unless ENV['IN_DOCKER'] == 'true'
|
||||
# We need wyhash in-tree.
|
||||
FileUtils.mkdir_p("ext/google/protobuf_c/third_party/wyhash")
|
||||
FileUtils.cp("../third_party/wyhash/wyhash.h", "ext/google/protobuf_c/third_party/wyhash/wyhash.h")
|
||||
end
|
||||
|
||||
Rake::ExtensionTask.new("protobuf_c", spec) do |ext|
|
||||
unless RUBY_PLATFORM =~ /darwin/
|
||||
# TODO: also set "no_native to true" for mac if possible. As is,
|
||||
|
@ -41,7 +41,6 @@
|
||||
|
||||
#include "message.h"
|
||||
#include "protobuf.h"
|
||||
#include "third_party/wyhash/wyhash.h"
|
||||
|
||||
static upb_strview Convert_StringData(VALUE str, upb_arena *arena) {
|
||||
upb_strview ret;
|
||||
@ -328,19 +327,19 @@ bool Msgval_IsEqual(upb_msgval val1, upb_msgval val2, TypeInfo type_info) {
|
||||
uint64_t Msgval_GetHash(upb_msgval val, TypeInfo type_info, uint64_t seed) {
|
||||
switch (type_info.type) {
|
||||
case UPB_TYPE_BOOL:
|
||||
return wyhash(&val, 1, seed, _wyp);
|
||||
return Wyhash(&val, 1, seed, kWyhashSalt);
|
||||
case UPB_TYPE_FLOAT:
|
||||
case UPB_TYPE_INT32:
|
||||
case UPB_TYPE_UINT32:
|
||||
case UPB_TYPE_ENUM:
|
||||
return wyhash(&val, 4, seed, _wyp);
|
||||
return Wyhash(&val, 4, seed, kWyhashSalt);
|
||||
case UPB_TYPE_DOUBLE:
|
||||
case UPB_TYPE_INT64:
|
||||
case UPB_TYPE_UINT64:
|
||||
return wyhash(&val, 8, seed, _wyp);
|
||||
return Wyhash(&val, 8, seed, kWyhashSalt);
|
||||
case UPB_TYPE_STRING:
|
||||
case UPB_TYPE_BYTES:
|
||||
return wyhash(val.str_val.data, val.str_val.size, seed, _wyp);
|
||||
return Wyhash(val.str_val.data, val.str_val.size, seed, kWyhashSalt);
|
||||
case UPB_TYPE_MESSAGE:
|
||||
return Message_Hash(val.msg_val, type_info.def.msgdef, seed);
|
||||
default:
|
||||
|
@ -17,5 +17,4 @@ end
|
||||
$objs = ["protobuf.o", "convert.o", "defs.o", "message.o",
|
||||
"repeated_field.o", "map.o", "ruby-upb.o", "wrap_memcpy.o"]
|
||||
|
||||
find_header('third_party/wyhash/wyhash.h', '../../../..')
|
||||
create_makefile("google/protobuf_c")
|
||||
|
@ -35,7 +35,6 @@
|
||||
#include "map.h"
|
||||
#include "protobuf.h"
|
||||
#include "repeated_field.h"
|
||||
#include "third_party/wyhash/wyhash.h"
|
||||
|
||||
static VALUE cParseError = Qnil;
|
||||
static ID descriptor_instancevar_interned;
|
||||
@ -717,7 +716,7 @@ uint64_t Message_Hash(const upb_msg* msg, const upb_msgdef* m, uint64_t seed) {
|
||||
&size);
|
||||
|
||||
if (data) {
|
||||
uint64_t ret = wyhash(data, size, seed, _wyp);
|
||||
uint64_t ret = Wyhash(data, size, seed, kWyhashSalt);
|
||||
upb_arena_free(arena);
|
||||
return ret;
|
||||
} else {
|
||||
|
@ -34,7 +34,6 @@
|
||||
#include "defs.h"
|
||||
#include "message.h"
|
||||
#include "protobuf.h"
|
||||
#include "third_party/wyhash/wyhash.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Repeated field container type.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -636,6 +636,48 @@ void upb_msg_addunknown(upb_msg *msg, const char *data, size_t len,
|
||||
/* Returns a reference to the message's unknown data. */
|
||||
const char *upb_msg_getunknown(const upb_msg *msg, size_t *len);
|
||||
|
||||
/** upb_extreg *******************************************************************/
|
||||
|
||||
/* Extension registry: a dynamic data structure that stores a map of:
|
||||
* (upb_msglayout, number) -> extension info
|
||||
*
|
||||
* upb_decode() uses upb_extreg to look up extensions while parsing binary
|
||||
* format.
|
||||
*
|
||||
* upb_extreg is part of the mini-table (msglayout) family of objects. Like all
|
||||
* mini-table objects, it is suitable for reflection-less builds that do not
|
||||
* want to expose names into the binary.
|
||||
*
|
||||
* Unlike most mini-table types, upb_extreg requires dynamic memory allocation
|
||||
* and dynamic initialization:
|
||||
* * If reflection is being used, then upb_symtab will construct an appropriate
|
||||
* upb_extreg automatically.
|
||||
* * For a mini-table only build, the user must manually construct the
|
||||
* upb_extreg and populate it with all of the extensions the user cares about.
|
||||
* * A third alternative is to manually unpack relevant extensions after the
|
||||
* main parse is complete, similar to how Any works. This is perhaps the
|
||||
* nicest solution from the perspective of reducing dependencies, avoiding
|
||||
* dynamic memory allocation, and avoiding the need to parse uninteresting
|
||||
* extensions. The downsides are:
|
||||
* (1) parse errors are not caught during the main parse
|
||||
* (2) the CPU hit of parsing comes during access, which could cause an
|
||||
* undesirable stutter in application performance.
|
||||
*
|
||||
* Users cannot directly get or put into this map. Users can only add the
|
||||
* extensions from a generated module and pass the extension registry to the
|
||||
* binary decoder.
|
||||
*
|
||||
* A upb_symtab provides a upb_extreg, so any users who use reflection do not
|
||||
* need to populate a upb_extreg directly.
|
||||
*/
|
||||
|
||||
struct upb_extreg;
|
||||
typedef struct upb_extreg upb_extreg;
|
||||
|
||||
/* Creates a upb_extreg in the given arena. The arena must outlive any use of
|
||||
* the extreg. */
|
||||
upb_extreg *upb_extreg_new(upb_arena *arena);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
@ -657,12 +699,13 @@ enum {
|
||||
#define UPB_DECODE_MAXDEPTH(depth) ((depth) << 16)
|
||||
|
||||
bool _upb_decode(const char *buf, size_t size, upb_msg *msg,
|
||||
const upb_msglayout *l, upb_arena *arena, int options);
|
||||
const upb_msglayout *l, const upb_extreg *extreg, int options,
|
||||
upb_arena *arena);
|
||||
|
||||
UPB_INLINE
|
||||
bool upb_decode(const char *buf, size_t size, upb_msg *msg,
|
||||
const upb_msglayout *l, upb_arena *arena) {
|
||||
return _upb_decode(buf, size, msg, l, arena, 0);
|
||||
return _upb_decode(buf, size, msg, l, NULL, 0, arena);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -836,6 +879,10 @@ typedef struct upb_tabval {
|
||||
|
||||
/* upb_table ******************************************************************/
|
||||
|
||||
uint64_t Wyhash(const void *data, size_t len, uint64_t seed,
|
||||
const uint64_t salt[]);
|
||||
extern const uint64_t kWyhashSalt[5];
|
||||
|
||||
typedef struct _upb_tabent {
|
||||
upb_tabkey key;
|
||||
upb_tabval val;
|
||||
@ -1047,9 +1094,34 @@ typedef struct {
|
||||
int16_t presence; /* If >0, hasbit_index. If <0, ~oneof_index. */
|
||||
uint16_t submsg_index; /* undefined if descriptortype != MESSAGE or GROUP. */
|
||||
uint8_t descriptortype;
|
||||
uint8_t label; /* google.protobuf.Label or _UPB_LABEL_* above. */
|
||||
int8_t mode; /* upb_fieldmode, with flags from upb_labelflags */
|
||||
} upb_msglayout_field;
|
||||
|
||||
typedef enum {
|
||||
_UPB_MODE_MAP = 0,
|
||||
_UPB_MODE_ARRAY = 1,
|
||||
_UPB_MODE_SCALAR = 2,
|
||||
} upb_fieldmode;
|
||||
|
||||
/* Extra flags on the mode field. */
|
||||
enum upb_labelflags {
|
||||
_UPB_MODE_IS_PACKED = 4,
|
||||
};
|
||||
|
||||
UPB_INLINE upb_fieldmode _upb_getmode(const upb_msglayout_field *field) {
|
||||
return (upb_fieldmode)(field->mode & 3);
|
||||
}
|
||||
|
||||
UPB_INLINE bool _upb_repeated_or_map(const upb_msglayout_field *field) {
|
||||
/* This works because upb_fieldmode has no value 3. */
|
||||
return !(field->mode & _UPB_MODE_SCALAR);
|
||||
}
|
||||
|
||||
UPB_INLINE bool _upb_issubmsg(const upb_msglayout_field *field) {
|
||||
return field->descriptortype == UPB_DTYPE_MESSAGE ||
|
||||
field->descriptortype == UPB_DTYPE_GROUP;
|
||||
}
|
||||
|
||||
struct upb_decstate;
|
||||
struct upb_msglayout;
|
||||
|
||||
@ -1070,27 +1142,65 @@ struct upb_msglayout {
|
||||
uint16_t size;
|
||||
uint16_t field_count;
|
||||
bool extendable;
|
||||
uint8_t dense_below;
|
||||
uint8_t table_mask;
|
||||
/* To constant-initialize the tables of variable length, we need a flexible
|
||||
* array member, and we need to compile in C99 mode. */
|
||||
_upb_fasttable_entry fasttable[];
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
upb_msglayout_field field;
|
||||
const upb_msglayout *extendee;
|
||||
const upb_msglayout *submsg; /* NULL for non-submessage fields. */
|
||||
} upb_msglayout_ext;
|
||||
|
||||
/** upb_extreg ****************************************************************/
|
||||
|
||||
/* Adds the given extension info for message type |l| and field number |num|
|
||||
* into the registry. Returns false if this message type and field number were
|
||||
* already in the map, or if memory allocation fails. */
|
||||
bool _upb_extreg_add(upb_extreg *r, const upb_msglayout_ext *e, size_t count);
|
||||
|
||||
/* Looks up the extension (if any) defined for message type |l| and field
|
||||
* number |num|. If an extension was found, copies the field info into |*ext|
|
||||
* and returns true. Otherwise returns false. */
|
||||
const upb_msglayout_field *_upb_extreg_get(const upb_extreg *r,
|
||||
const upb_msglayout *l,
|
||||
uint32_t num);
|
||||
|
||||
/** upb_msg *******************************************************************/
|
||||
|
||||
/* Internal members of a upb_msg. We can change this without breaking binary
|
||||
* compatibility. We put these before the user's data. The user's upb_msg*
|
||||
* points after the upb_msg_internal. */
|
||||
/* Internal members of a upb_msg that track unknown fields and/or extensions.
|
||||
* We can change this without breaking binary compatibility. We put these
|
||||
* before the user's data. The user's upb_msg* points after the
|
||||
* upb_msg_internal. */
|
||||
|
||||
typedef struct {
|
||||
uint32_t len;
|
||||
/* Total size of this structure, including the data that follows.
|
||||
* Must be aligned to 8, which is alignof(upb_msg_ext) */
|
||||
uint32_t size;
|
||||
/* Data follows. */
|
||||
} upb_msg_unknowndata;
|
||||
|
||||
/* Used when a message is not extendable. */
|
||||
/* Offsets relative to the beginning of this structure.
|
||||
*
|
||||
* Unknown data grows forward from the beginning to unknown_end.
|
||||
* Extension data grows backward from size to ext_begin.
|
||||
* When the two meet, we're out of data and have to realloc.
|
||||
*
|
||||
* If we imagine that the final member of this struct is:
|
||||
* char data[size - overhead]; // overhead = sizeof(upb_msg_internaldata)
|
||||
*
|
||||
* Then we have:
|
||||
* unknown data: data[0 .. (unknown_end - overhead)]
|
||||
* extensions data: data[(ext_begin - overhead) .. (size - overhead)] */
|
||||
uint32_t unknown_end;
|
||||
uint32_t ext_begin;
|
||||
/* Data follows, as if there were an array:
|
||||
* char data[size - sizeof(upb_msg_internaldata)]; */
|
||||
} upb_msg_internaldata;
|
||||
|
||||
typedef struct {
|
||||
upb_msg_unknowndata *unknown;
|
||||
upb_msg_internaldata *internal;
|
||||
} upb_msg_internal;
|
||||
|
||||
/* Maps upb_fieldtype_t -> memory size. */
|
||||
@ -1129,6 +1239,35 @@ void _upb_msg_discardunknown_shallow(upb_msg *msg);
|
||||
bool _upb_msg_addunknown(upb_msg *msg, const char *data, size_t len,
|
||||
upb_arena *arena);
|
||||
|
||||
/** upb_msg_ext ***************************************************************/
|
||||
|
||||
/* The internal representation of an extension is self-describing: it contains
|
||||
* enough information that we can serialize it to binary format without needing
|
||||
* to look it up in a registry. */
|
||||
typedef struct {
|
||||
const upb_msglayout_ext *ext;
|
||||
union {
|
||||
upb_strview str;
|
||||
void *ptr;
|
||||
double dbl;
|
||||
char scalar_data[8];
|
||||
} data;
|
||||
} upb_msg_ext;
|
||||
|
||||
/* Adds the given extension data to the given message. The returned extension will
|
||||
* have its "ext" member initialized according to |ext|. */
|
||||
upb_msg_ext *_upb_msg_getorcreateext(upb_msg *msg, const upb_msglayout_ext *ext,
|
||||
upb_arena *arena);
|
||||
|
||||
/* Returns an array of extensions for this message. Note: the array is
|
||||
* ordered in reverse relative to the order of creation. */
|
||||
const upb_msg_ext *_upb_msg_getexts(const upb_msg *msg, size_t *count);
|
||||
|
||||
/* Returns an extension for the given field number, or NULL if no extension
|
||||
* exists for this field number. */
|
||||
const upb_msg_ext *_upb_msg_getext(const upb_msg *msg,
|
||||
const upb_msglayout_ext *ext);
|
||||
|
||||
/** Hasbit access *************************************************************/
|
||||
|
||||
UPB_INLINE bool _upb_hasbit(const upb_msg *msg, size_t idx) {
|
||||
@ -1192,14 +1331,6 @@ UPB_INLINE bool _upb_has_submsg_nohasbit(const upb_msg *msg, size_t ofs) {
|
||||
return *UPB_PTR_AT(msg, ofs, const upb_msg*) != NULL;
|
||||
}
|
||||
|
||||
UPB_INLINE bool _upb_isrepeated(const upb_msglayout_field *field) {
|
||||
return (field->label & 3) == UPB_LABEL_REPEATED;
|
||||
}
|
||||
|
||||
UPB_INLINE bool _upb_repeated_or_map(const upb_msglayout_field *field) {
|
||||
return field->label >= UPB_LABEL_REPEATED;
|
||||
}
|
||||
|
||||
/** upb_array *****************************************************************/
|
||||
|
||||
/* Our internal representation for repeated fields. */
|
||||
@ -2121,13 +2252,19 @@ UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_
|
||||
UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_FileDescriptorSet *ret = google_protobuf_FileDescriptorSet_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_FileDescriptorSet_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_FileDescriptorSet_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_FileDescriptorSet *ret = google_protobuf_FileDescriptorSet_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_FileDescriptorSet_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_FileDescriptorSet_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_FileDescriptorSet_serialize(const google_protobuf_FileDescriptorSet *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_FileDescriptorSet_msginit, arena, len);
|
||||
@ -2158,13 +2295,19 @@ UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorPr
|
||||
UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_FileDescriptorProto *ret = google_protobuf_FileDescriptorProto_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_FileDescriptorProto_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_FileDescriptorProto_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_FileDescriptorProto *ret = google_protobuf_FileDescriptorProto_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_FileDescriptorProto_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_FileDescriptorProto_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_FileDescriptorProto_serialize(const google_protobuf_FileDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_FileDescriptorProto_msginit, arena, len);
|
||||
@ -2321,13 +2464,19 @@ UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_new(
|
||||
UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_DescriptorProto *ret = google_protobuf_DescriptorProto_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_DescriptorProto *ret = google_protobuf_DescriptorProto_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_DescriptorProto_serialize(const google_protobuf_DescriptorProto *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_DescriptorProto_msginit, arena, len);
|
||||
@ -2480,13 +2629,19 @@ UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_Descr
|
||||
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_DescriptorProto_ExtensionRange *ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ExtensionRange_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ExtensionRange_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_DescriptorProto_ExtensionRange *ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ExtensionRange_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ExtensionRange_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_DescriptorProto_ExtensionRange_serialize(const google_protobuf_DescriptorProto_ExtensionRange *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_DescriptorProto_ExtensionRange_msginit, arena, len);
|
||||
@ -2529,13 +2684,19 @@ UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_Descri
|
||||
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_DescriptorProto_ReservedRange *ret = google_protobuf_DescriptorProto_ReservedRange_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ReservedRange_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ReservedRange_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_DescriptorProto_ReservedRange *ret = google_protobuf_DescriptorProto_ReservedRange_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ReservedRange_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ReservedRange_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_DescriptorProto_ReservedRange_serialize(const google_protobuf_DescriptorProto_ReservedRange *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_DescriptorProto_ReservedRange_msginit, arena, len);
|
||||
@ -2563,13 +2724,19 @@ UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRange
|
||||
UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_ExtensionRangeOptions *ret = google_protobuf_ExtensionRangeOptions_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_ExtensionRangeOptions_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_ExtensionRangeOptions_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_ExtensionRangeOptions *ret = google_protobuf_ExtensionRangeOptions_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_ExtensionRangeOptions_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_ExtensionRangeOptions_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_ExtensionRangeOptions_serialize(const google_protobuf_ExtensionRangeOptions *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_ExtensionRangeOptions_msginit, arena, len);
|
||||
@ -2600,13 +2767,19 @@ UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptor
|
||||
UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_FieldDescriptorProto *ret = google_protobuf_FieldDescriptorProto_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_FieldDescriptorProto_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_FieldDescriptorProto_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_FieldDescriptorProto *ret = google_protobuf_FieldDescriptorProto_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_FieldDescriptorProto_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_FieldDescriptorProto_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_FieldDescriptorProto_serialize(const google_protobuf_FieldDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_FieldDescriptorProto_msginit, arena, len);
|
||||
@ -2697,13 +2870,19 @@ UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptor
|
||||
UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_OneofDescriptorProto *ret = google_protobuf_OneofDescriptorProto_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_OneofDescriptorProto_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_OneofDescriptorProto_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_OneofDescriptorProto *ret = google_protobuf_OneofDescriptorProto_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_OneofDescriptorProto_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_OneofDescriptorProto_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_OneofDescriptorProto_serialize(const google_protobuf_OneofDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_OneofDescriptorProto_msginit, arena, len);
|
||||
@ -2740,13 +2919,19 @@ UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorPr
|
||||
UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_EnumDescriptorProto *ret = google_protobuf_EnumDescriptorProto_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_EnumDescriptorProto *ret = google_protobuf_EnumDescriptorProto_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_EnumDescriptorProto_serialize(const google_protobuf_EnumDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_EnumDescriptorProto_msginit, arena, len);
|
||||
@ -2824,13 +3009,19 @@ UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobu
|
||||
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_EnumDescriptorProto_EnumReservedRange *ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_EnumDescriptorProto_EnumReservedRange *ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena, len);
|
||||
@ -2858,13 +3049,19 @@ UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDe
|
||||
UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_EnumValueDescriptorProto *ret = google_protobuf_EnumValueDescriptorProto_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumValueDescriptorProto_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_EnumValueDescriptorProto_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_EnumValueDescriptorProto *ret = google_protobuf_EnumValueDescriptorProto_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_EnumValueDescriptorProto_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_EnumValueDescriptorProto_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_EnumValueDescriptorProto_serialize(const google_protobuf_EnumValueDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_EnumValueDescriptorProto_msginit, arena, len);
|
||||
@ -2907,13 +3104,19 @@ UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescri
|
||||
UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_ServiceDescriptorProto *ret = google_protobuf_ServiceDescriptorProto_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_ServiceDescriptorProto_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_ServiceDescriptorProto_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_ServiceDescriptorProto *ret = google_protobuf_ServiceDescriptorProto_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_ServiceDescriptorProto_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_ServiceDescriptorProto_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_ServiceDescriptorProto_serialize(const google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_ServiceDescriptorProto_msginit, arena, len);
|
||||
@ -2965,13 +3168,19 @@ UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescript
|
||||
UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_MethodDescriptorProto *ret = google_protobuf_MethodDescriptorProto_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_MethodDescriptorProto_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_MethodDescriptorProto_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_MethodDescriptorProto *ret = google_protobuf_MethodDescriptorProto_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_MethodDescriptorProto_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_MethodDescriptorProto_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_MethodDescriptorProto_serialize(const google_protobuf_MethodDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_MethodDescriptorProto_msginit, arena, len);
|
||||
@ -3032,13 +3241,19 @@ UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_new(upb_aren
|
||||
UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_FileOptions *ret = google_protobuf_FileOptions_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_FileOptions_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_FileOptions_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_FileOptions *ret = google_protobuf_FileOptions_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_FileOptions_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_FileOptions_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_FileOptions_serialize(const google_protobuf_FileOptions *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_FileOptions_msginit, arena, len);
|
||||
@ -3189,13 +3404,19 @@ UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_new(up
|
||||
UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_MessageOptions *ret = google_protobuf_MessageOptions_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_MessageOptions_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_MessageOptions_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_MessageOptions *ret = google_protobuf_MessageOptions_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_MessageOptions_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_MessageOptions_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_MessageOptions_serialize(const google_protobuf_MessageOptions *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_MessageOptions_msginit, arena, len);
|
||||
@ -3250,13 +3471,19 @@ UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_new(upb_ar
|
||||
UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_FieldOptions *ret = google_protobuf_FieldOptions_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_FieldOptions_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_FieldOptions_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_FieldOptions *ret = google_protobuf_FieldOptions_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_FieldOptions_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_FieldOptions_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_FieldOptions_serialize(const google_protobuf_FieldOptions *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_FieldOptions_msginit, arena, len);
|
||||
@ -3323,13 +3550,19 @@ UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_new(upb_ar
|
||||
UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_OneofOptions *ret = google_protobuf_OneofOptions_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_OneofOptions_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_OneofOptions_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_OneofOptions *ret = google_protobuf_OneofOptions_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_OneofOptions_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_OneofOptions_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_OneofOptions_serialize(const google_protobuf_OneofOptions *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_OneofOptions_msginit, arena, len);
|
||||
@ -3360,13 +3593,19 @@ UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_new(upb_aren
|
||||
UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_EnumOptions *ret = google_protobuf_EnumOptions_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumOptions_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_EnumOptions_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_EnumOptions *ret = google_protobuf_EnumOptions_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_EnumOptions_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_EnumOptions_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_EnumOptions_serialize(const google_protobuf_EnumOptions *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_EnumOptions_msginit, arena, len);
|
||||
@ -3409,13 +3648,19 @@ UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_ne
|
||||
UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_EnumValueOptions *ret = google_protobuf_EnumValueOptions_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumValueOptions_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_EnumValueOptions_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_EnumValueOptions *ret = google_protobuf_EnumValueOptions_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_EnumValueOptions_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_EnumValueOptions_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_EnumValueOptions_serialize(const google_protobuf_EnumValueOptions *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_EnumValueOptions_msginit, arena, len);
|
||||
@ -3452,13 +3697,19 @@ UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_new(up
|
||||
UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_ServiceOptions *ret = google_protobuf_ServiceOptions_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_ServiceOptions_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_ServiceOptions_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_ServiceOptions *ret = google_protobuf_ServiceOptions_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_ServiceOptions_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_ServiceOptions_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_ServiceOptions_serialize(const google_protobuf_ServiceOptions *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_ServiceOptions_msginit, arena, len);
|
||||
@ -3495,13 +3746,19 @@ UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_new(upb_
|
||||
UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_MethodOptions *ret = google_protobuf_MethodOptions_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_MethodOptions_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_MethodOptions_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_MethodOptions *ret = google_protobuf_MethodOptions_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_MethodOptions_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_MethodOptions_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_MethodOptions_serialize(const google_protobuf_MethodOptions *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_MethodOptions_msginit, arena, len);
|
||||
@ -3544,13 +3801,19 @@ UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOpt
|
||||
UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_UninterpretedOption *ret = google_protobuf_UninterpretedOption_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_UninterpretedOption *ret = google_protobuf_UninterpretedOption_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_UninterpretedOption_serialize(const google_protobuf_UninterpretedOption *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_UninterpretedOption_msginit, arena, len);
|
||||
@ -3617,13 +3880,19 @@ UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_Uninter
|
||||
UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_UninterpretedOption_NamePart *ret = google_protobuf_UninterpretedOption_NamePart_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_NamePart_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_NamePart_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_UninterpretedOption_NamePart *ret = google_protobuf_UninterpretedOption_NamePart_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_NamePart_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_NamePart_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_UninterpretedOption_NamePart_serialize(const google_protobuf_UninterpretedOption_NamePart *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_UninterpretedOption_NamePart_msginit, arena, len);
|
||||
@ -3651,13 +3920,19 @@ UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_new(up
|
||||
UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_SourceCodeInfo *ret = google_protobuf_SourceCodeInfo_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_SourceCodeInfo *ret = google_protobuf_SourceCodeInfo_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_SourceCodeInfo_serialize(const google_protobuf_SourceCodeInfo *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_SourceCodeInfo_msginit, arena, len);
|
||||
@ -3688,13 +3963,19 @@ UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeIn
|
||||
UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_SourceCodeInfo_Location *ret = google_protobuf_SourceCodeInfo_Location_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_Location_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_Location_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_SourceCodeInfo_Location *ret = google_protobuf_SourceCodeInfo_Location_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_Location_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_Location_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_SourceCodeInfo_Location_serialize(const google_protobuf_SourceCodeInfo_Location *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_SourceCodeInfo_Location_msginit, arena, len);
|
||||
@ -3755,13 +4036,19 @@ UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_
|
||||
UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_GeneratedCodeInfo *ret = google_protobuf_GeneratedCodeInfo_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_GeneratedCodeInfo *ret = google_protobuf_GeneratedCodeInfo_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_GeneratedCodeInfo_serialize(const google_protobuf_GeneratedCodeInfo *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_msginit, arena, len);
|
||||
@ -3792,13 +4079,19 @@ UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_Generat
|
||||
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_parse(const char *buf, size_t size,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_GeneratedCodeInfo_Annotation *ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena);
|
||||
return (ret && upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena)) ? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena)) return NULL;
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_parse_ex(const char *buf, size_t size,
|
||||
upb_arena *arena, int options) {
|
||||
const upb_extreg *extreg, int options,
|
||||
upb_arena *arena) {
|
||||
google_protobuf_GeneratedCodeInfo_Annotation *ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena);
|
||||
return (ret && _upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena, options))
|
||||
? ret : NULL;
|
||||
if (!ret) return NULL;
|
||||
if (!_upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, extreg, options, arena)) {
|
||||
return NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
UPB_INLINE char *google_protobuf_GeneratedCodeInfo_Annotation_serialize(const google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_arena *arena, size_t *len) {
|
||||
return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena, len);
|
||||
|
@ -7,7 +7,24 @@ require 'google/protobuf/descriptor_pb'
|
||||
module Google
|
||||
module Protobuf
|
||||
module Internal
|
||||
class AtomicCounter
|
||||
def initialize
|
||||
@n = 0
|
||||
@mu = Mutex.new
|
||||
end
|
||||
|
||||
def get_and_increment
|
||||
n = @n
|
||||
@mu.synchronize {
|
||||
@n += 1
|
||||
}
|
||||
return n
|
||||
end
|
||||
end
|
||||
|
||||
class Builder
|
||||
@@file_number = AtomicCounter.new
|
||||
|
||||
def initialize(pool)
|
||||
@pool = pool
|
||||
@default_file = nil # Constructed lazily
|
||||
@ -42,7 +59,9 @@ module Google
|
||||
end
|
||||
|
||||
private def internal_default_file
|
||||
@default_file ||= FileBuilder.new(@pool, "ruby_default_file.proto")
|
||||
number = @@file_number.get_and_increment
|
||||
filename = "ruby_default_file#{number}.proto"
|
||||
@default_file ||= FileBuilder.new(@pool, filename)
|
||||
end
|
||||
end
|
||||
|
||||
|
617
src/Makefile.am
617
src/Makefile.am
@ -39,18 +39,19 @@ protodir = $(includedir)
|
||||
# If you are adding new files here, also remember to change the build files for
|
||||
# all other languages, //protoc-artifacts/build-zip.sh and run
|
||||
# //update_file_list.sh for bazel.
|
||||
nobase_dist_proto_DATA = google/protobuf/descriptor.proto \
|
||||
google/protobuf/any.proto \
|
||||
google/protobuf/api.proto \
|
||||
google/protobuf/duration.proto \
|
||||
google/protobuf/empty.proto \
|
||||
google/protobuf/field_mask.proto \
|
||||
google/protobuf/source_context.proto \
|
||||
google/protobuf/struct.proto \
|
||||
google/protobuf/timestamp.proto \
|
||||
google/protobuf/type.proto \
|
||||
google/protobuf/wrappers.proto \
|
||||
google/protobuf/compiler/plugin.proto
|
||||
nobase_dist_proto_DATA = \
|
||||
google/protobuf/any.proto \
|
||||
google/protobuf/api.proto \
|
||||
google/protobuf/compiler/plugin.proto \
|
||||
google/protobuf/descriptor.proto \
|
||||
google/protobuf/duration.proto \
|
||||
google/protobuf/empty.proto \
|
||||
google/protobuf/field_mask.proto \
|
||||
google/protobuf/source_context.proto \
|
||||
google/protobuf/struct.proto \
|
||||
google/protobuf/timestamp.proto \
|
||||
google/protobuf/type.proto \
|
||||
google/protobuf/wrappers.proto
|
||||
|
||||
# Not sure why these don't get cleaned automatically.
|
||||
clean-local:
|
||||
@ -64,8 +65,83 @@ MAINTAINERCLEANFILES = \
|
||||
Makefile.in
|
||||
|
||||
nobase_include_HEADERS = \
|
||||
google/protobuf/stubs/callback.h \
|
||||
google/protobuf/any.h \
|
||||
google/protobuf/any.pb.h \
|
||||
google/protobuf/api.pb.h \
|
||||
google/protobuf/arena.h \
|
||||
google/protobuf/arena_impl.h \
|
||||
google/protobuf/arenastring.h \
|
||||
google/protobuf/compiler/code_generator.h \
|
||||
google/protobuf/compiler/command_line_interface.h \
|
||||
google/protobuf/compiler/cpp/cpp_generator.h \
|
||||
google/protobuf/compiler/csharp/csharp_generator.h \
|
||||
google/protobuf/compiler/csharp/csharp_names.h \
|
||||
google/protobuf/compiler/importer.h \
|
||||
google/protobuf/compiler/java/java_generator.h \
|
||||
google/protobuf/compiler/java/java_kotlin_generator.h \
|
||||
google/protobuf/compiler/java/java_names.h \
|
||||
google/protobuf/compiler/js/js_generator.h \
|
||||
google/protobuf/compiler/js/well_known_types_embed.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_generator.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_helpers.h \
|
||||
google/protobuf/compiler/parser.h \
|
||||
google/protobuf/compiler/php/php_generator.h \
|
||||
google/protobuf/compiler/plugin.h \
|
||||
google/protobuf/compiler/plugin.pb.h \
|
||||
google/protobuf/compiler/python/python_generator.h \
|
||||
google/protobuf/compiler/ruby/ruby_generator.h \
|
||||
google/protobuf/descriptor.h \
|
||||
google/protobuf/descriptor.pb.h \
|
||||
google/protobuf/descriptor_database.h \
|
||||
google/protobuf/duration.pb.h \
|
||||
google/protobuf/dynamic_message.h \
|
||||
google/protobuf/empty.pb.h \
|
||||
google/protobuf/extension_set.h \
|
||||
google/protobuf/extension_set_inl.h \
|
||||
google/protobuf/field_access_listener.h \
|
||||
google/protobuf/field_mask.pb.h \
|
||||
google/protobuf/generated_enum_reflection.h \
|
||||
google/protobuf/generated_enum_util.h \
|
||||
google/protobuf/generated_message_bases.h \
|
||||
google/protobuf/generated_message_reflection.h \
|
||||
google/protobuf/generated_message_table_driven.h \
|
||||
google/protobuf/generated_message_util.h \
|
||||
google/protobuf/has_bits.h \
|
||||
google/protobuf/implicit_weak_message.h \
|
||||
google/protobuf/inlined_string_field.h \
|
||||
google/protobuf/io/coded_stream.h \
|
||||
$(GZHEADERS) \
|
||||
google/protobuf/io/io_win32.h \
|
||||
google/protobuf/io/printer.h \
|
||||
google/protobuf/io/strtod.h \
|
||||
google/protobuf/io/tokenizer.h \
|
||||
google/protobuf/io/zero_copy_stream.h \
|
||||
google/protobuf/io/zero_copy_stream_impl.h \
|
||||
google/protobuf/io/zero_copy_stream_impl_lite.h \
|
||||
google/protobuf/map.h \
|
||||
google/protobuf/map_entry.h \
|
||||
google/protobuf/map_entry_lite.h \
|
||||
google/protobuf/map_field.h \
|
||||
google/protobuf/map_field_inl.h \
|
||||
google/protobuf/map_field_lite.h \
|
||||
google/protobuf/map_type_handler.h \
|
||||
google/protobuf/message.h \
|
||||
google/protobuf/message_lite.h \
|
||||
google/protobuf/metadata.h \
|
||||
google/protobuf/metadata_lite.h \
|
||||
google/protobuf/parse_context.h \
|
||||
google/protobuf/port_def.inc \
|
||||
google/protobuf/port_undef.inc \
|
||||
google/protobuf/port.h \
|
||||
google/protobuf/reflection.h \
|
||||
google/protobuf/reflection_ops.h \
|
||||
google/protobuf/repeated_field.h \
|
||||
google/protobuf/service.h \
|
||||
google/protobuf/source_context.pb.h \
|
||||
google/protobuf/string_member_robber.h \
|
||||
google/protobuf/struct.pb.h \
|
||||
google/protobuf/stubs/bytestream.h \
|
||||
google/protobuf/stubs/callback.h \
|
||||
google/protobuf/stubs/casts.h \
|
||||
google/protobuf/stubs/common.h \
|
||||
google/protobuf/stubs/hash.h \
|
||||
@ -81,95 +157,21 @@ nobase_include_HEADERS = \
|
||||
google/protobuf/stubs/stringpiece.h \
|
||||
google/protobuf/stubs/strutil.h \
|
||||
google/protobuf/stubs/template_util.h \
|
||||
google/protobuf/any.pb.h \
|
||||
google/protobuf/api.pb.h \
|
||||
google/protobuf/any.h \
|
||||
google/protobuf/arena.h \
|
||||
google/protobuf/arena_impl.h \
|
||||
google/protobuf/arenastring.h \
|
||||
google/protobuf/descriptor_database.h \
|
||||
google/protobuf/descriptor.h \
|
||||
google/protobuf/descriptor.pb.h \
|
||||
google/protobuf/duration.pb.h \
|
||||
google/protobuf/dynamic_message.h \
|
||||
google/protobuf/empty.pb.h \
|
||||
google/protobuf/extension_set.h \
|
||||
google/protobuf/extension_set_inl.h \
|
||||
google/protobuf/field_access_listener.h \
|
||||
google/protobuf/field_mask.pb.h \
|
||||
google/protobuf/generated_enum_reflection.h \
|
||||
google/protobuf/generated_enum_util.h \
|
||||
google/protobuf/generated_message_reflection.h \
|
||||
google/protobuf/generated_message_table_driven.h \
|
||||
google/protobuf/generated_message_util.h \
|
||||
google/protobuf/has_bits.h \
|
||||
google/protobuf/implicit_weak_message.h \
|
||||
google/protobuf/inlined_string_field.h \
|
||||
google/protobuf/io/io_win32.h \
|
||||
google/protobuf/map_entry.h \
|
||||
google/protobuf/map_entry_lite.h \
|
||||
google/protobuf/map_field.h \
|
||||
google/protobuf/map_field_inl.h \
|
||||
google/protobuf/map_field_lite.h \
|
||||
google/protobuf/map.h \
|
||||
google/protobuf/map_type_handler.h \
|
||||
google/protobuf/message.h \
|
||||
google/protobuf/message_lite.h \
|
||||
google/protobuf/metadata.h \
|
||||
google/protobuf/metadata_lite.h \
|
||||
google/protobuf/parse_context.h \
|
||||
google/protobuf/port.h \
|
||||
google/protobuf/port_def.inc \
|
||||
google/protobuf/port_undef.inc \
|
||||
google/protobuf/reflection.h \
|
||||
google/protobuf/reflection_ops.h \
|
||||
google/protobuf/repeated_field.h \
|
||||
google/protobuf/service.h \
|
||||
google/protobuf/source_context.pb.h \
|
||||
google/protobuf/string_member_robber.h \
|
||||
google/protobuf/struct.pb.h \
|
||||
google/protobuf/text_format.h \
|
||||
google/protobuf/timestamp.pb.h \
|
||||
google/protobuf/type.pb.h \
|
||||
google/protobuf/unknown_field_set.h \
|
||||
google/protobuf/wire_format.h \
|
||||
google/protobuf/wire_format_lite.h \
|
||||
google/protobuf/wrappers.pb.h \
|
||||
google/protobuf/io/coded_stream.h \
|
||||
$(GZHEADERS) \
|
||||
google/protobuf/io/printer.h \
|
||||
google/protobuf/io/strtod.h \
|
||||
google/protobuf/io/tokenizer.h \
|
||||
google/protobuf/io/zero_copy_stream.h \
|
||||
google/protobuf/io/zero_copy_stream_impl.h \
|
||||
google/protobuf/io/zero_copy_stream_impl_lite.h \
|
||||
google/protobuf/compiler/code_generator.h \
|
||||
google/protobuf/compiler/command_line_interface.h \
|
||||
google/protobuf/compiler/importer.h \
|
||||
google/protobuf/compiler/parser.h \
|
||||
google/protobuf/compiler/plugin.h \
|
||||
google/protobuf/compiler/plugin.pb.h \
|
||||
google/protobuf/compiler/cpp/cpp_generator.h \
|
||||
google/protobuf/compiler/csharp/csharp_generator.h \
|
||||
google/protobuf/compiler/csharp/csharp_names.h \
|
||||
google/protobuf/compiler/java/java_generator.h \
|
||||
google/protobuf/compiler/java/java_kotlin_generator.h \
|
||||
google/protobuf/compiler/java/java_names.h \
|
||||
google/protobuf/compiler/js/js_generator.h \
|
||||
google/protobuf/compiler/js/well_known_types_embed.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_generator.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_helpers.h \
|
||||
google/protobuf/compiler/php/php_generator.h \
|
||||
google/protobuf/compiler/python/python_generator.h \
|
||||
google/protobuf/compiler/ruby/ruby_generator.h \
|
||||
google/protobuf/util/type_resolver.h \
|
||||
google/protobuf/util/delimited_message_util.h \
|
||||
google/protobuf/util/field_comparator.h \
|
||||
google/protobuf/util/field_mask_util.h \
|
||||
google/protobuf/util/json_util.h \
|
||||
google/protobuf/util/message_differencer.h \
|
||||
google/protobuf/util/time_util.h \
|
||||
google/protobuf/util/type_resolver.h \
|
||||
google/protobuf/util/type_resolver_util.h \
|
||||
google/protobuf/util/message_differencer.h
|
||||
google/protobuf/wire_format.h \
|
||||
google/protobuf/wire_format_lite.h \
|
||||
google/protobuf/wrappers.pb.h
|
||||
|
||||
lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la
|
||||
|
||||
@ -180,18 +182,37 @@ libprotobuf_lite_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf-lite.m
|
||||
EXTRA_libprotobuf_lite_la_DEPENDENCIES = libprotobuf-lite.map
|
||||
endif
|
||||
libprotobuf_lite_la_SOURCES = \
|
||||
google/protobuf/any_lite.cc \
|
||||
google/protobuf/arena.cc \
|
||||
google/protobuf/arenastring.cc \
|
||||
google/protobuf/extension_set.cc \
|
||||
google/protobuf/generated_enum_util.cc \
|
||||
google/protobuf/generated_message_table_driven_lite.cc \
|
||||
google/protobuf/generated_message_table_driven_lite.h \
|
||||
google/protobuf/generated_message_util.cc \
|
||||
google/protobuf/implicit_weak_message.cc \
|
||||
google/protobuf/inlined_string_field.cc \
|
||||
google/protobuf/io/coded_stream.cc \
|
||||
google/protobuf/io/io_win32.cc \
|
||||
google/protobuf/io/strtod.cc \
|
||||
google/protobuf/io/zero_copy_stream.cc \
|
||||
google/protobuf/io/zero_copy_stream_impl.cc \
|
||||
google/protobuf/io/zero_copy_stream_impl_lite.cc \
|
||||
google/protobuf/map.cc \
|
||||
google/protobuf/message_lite.cc \
|
||||
google/protobuf/parse_context.cc \
|
||||
google/protobuf/repeated_field.cc \
|
||||
google/protobuf/stubs/bytestream.cc \
|
||||
google/protobuf/stubs/bytestream.h \
|
||||
google/protobuf/stubs/common.cc \
|
||||
google/protobuf/stubs/hash.h \
|
||||
google/protobuf/stubs/int128.cc \
|
||||
google/protobuf/stubs/int128.h \
|
||||
google/protobuf/io/io_win32.cc \
|
||||
google/protobuf/stubs/map_util.h \
|
||||
google/protobuf/stubs/mathutil.h \
|
||||
google/protobuf/stubs/status_macros.h \
|
||||
google/protobuf/stubs/status.cc \
|
||||
google/protobuf/stubs/status.h \
|
||||
google/protobuf/stubs/status_macros.h \
|
||||
google/protobuf/stubs/statusor.cc \
|
||||
google/protobuf/stubs/statusor.h \
|
||||
google/protobuf/stubs/stringpiece.cc \
|
||||
@ -202,27 +223,7 @@ libprotobuf_lite_la_SOURCES = \
|
||||
google/protobuf/stubs/strutil.cc \
|
||||
google/protobuf/stubs/time.cc \
|
||||
google/protobuf/stubs/time.h \
|
||||
google/protobuf/any_lite.cc \
|
||||
google/protobuf/arena.cc \
|
||||
google/protobuf/arenastring.cc \
|
||||
google/protobuf/extension_set.cc \
|
||||
google/protobuf/field_access_listener.cc \
|
||||
google/protobuf/generated_enum_util.cc \
|
||||
google/protobuf/generated_message_util.cc \
|
||||
google/protobuf/generated_message_table_driven_lite.h \
|
||||
google/protobuf/generated_message_table_driven_lite.cc \
|
||||
google/protobuf/implicit_weak_message.cc \
|
||||
google/protobuf/inlined_string_field.cc \
|
||||
google/protobuf/map.cc \
|
||||
google/protobuf/message_lite.cc \
|
||||
google/protobuf/parse_context.cc \
|
||||
google/protobuf/repeated_field.cc \
|
||||
google/protobuf/wire_format_lite.cc \
|
||||
google/protobuf/io/coded_stream.cc \
|
||||
google/protobuf/io/strtod.cc \
|
||||
google/protobuf/io/zero_copy_stream.cc \
|
||||
google/protobuf/io/zero_copy_stream_impl.cc \
|
||||
google/protobuf/io/zero_copy_stream_impl_lite.cc
|
||||
google/protobuf/wire_format_lite.cc
|
||||
|
||||
libprotobuf_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS)
|
||||
libprotobuf_la_LDFLAGS = -version-info $(PROTOBUF_VERSION) -export-dynamic -no-undefined
|
||||
@ -232,20 +233,26 @@ EXTRA_libprotobuf_la_DEPENDENCIES = libprotobuf.map
|
||||
endif
|
||||
libprotobuf_la_SOURCES = \
|
||||
$(libprotobuf_lite_la_SOURCES) \
|
||||
google/protobuf/any.cc \
|
||||
google/protobuf/any.pb.cc \
|
||||
google/protobuf/api.pb.cc \
|
||||
google/protobuf/any.cc \
|
||||
google/protobuf/compiler/importer.cc \
|
||||
google/protobuf/compiler/parser.cc \
|
||||
google/protobuf/descriptor.cc \
|
||||
google/protobuf/descriptor_database.cc \
|
||||
google/protobuf/descriptor.pb.cc \
|
||||
google/protobuf/descriptor_database.cc \
|
||||
google/protobuf/duration.pb.cc \
|
||||
google/protobuf/dynamic_message.cc \
|
||||
google/protobuf/empty.pb.cc \
|
||||
google/protobuf/extension_set_heavy.cc \
|
||||
google/protobuf/field_mask.pb.cc \
|
||||
google/protobuf/generated_message_bases.cc \
|
||||
google/protobuf/generated_message_reflection.cc \
|
||||
google/protobuf/generated_message_table_driven_lite.h \
|
||||
google/protobuf/generated_message_table_driven.cc \
|
||||
google/protobuf/generated_message_table_driven_lite.h \
|
||||
google/protobuf/io/gzip_stream.cc \
|
||||
google/protobuf/io/printer.cc \
|
||||
google/protobuf/io/tokenizer.cc \
|
||||
google/protobuf/map_field.cc \
|
||||
google/protobuf/message.cc \
|
||||
google/protobuf/reflection_internal.h \
|
||||
@ -259,13 +266,6 @@ libprotobuf_la_SOURCES = \
|
||||
google/protobuf/timestamp.pb.cc \
|
||||
google/protobuf/type.pb.cc \
|
||||
google/protobuf/unknown_field_set.cc \
|
||||
google/protobuf/wire_format.cc \
|
||||
google/protobuf/wrappers.pb.cc \
|
||||
google/protobuf/io/gzip_stream.cc \
|
||||
google/protobuf/io/printer.cc \
|
||||
google/protobuf/io/tokenizer.cc \
|
||||
google/protobuf/compiler/importer.cc \
|
||||
google/protobuf/compiler/parser.cc \
|
||||
google/protobuf/util/delimited_message_util.cc \
|
||||
google/protobuf/util/field_comparator.cc \
|
||||
google/protobuf/util/field_mask_util.cc \
|
||||
@ -291,12 +291,12 @@ libprotobuf_la_SOURCES = \
|
||||
google/protobuf/util/internal/object_source.h \
|
||||
google/protobuf/util/internal/object_writer.cc \
|
||||
google/protobuf/util/internal/object_writer.h \
|
||||
google/protobuf/util/internal/proto_writer.cc \
|
||||
google/protobuf/util/internal/proto_writer.h \
|
||||
google/protobuf/util/internal/protostream_objectsource.cc \
|
||||
google/protobuf/util/internal/protostream_objectsource.h \
|
||||
google/protobuf/util/internal/protostream_objectwriter.cc \
|
||||
google/protobuf/util/internal/protostream_objectwriter.h \
|
||||
google/protobuf/util/internal/proto_writer.cc \
|
||||
google/protobuf/util/internal/proto_writer.h \
|
||||
google/protobuf/util/internal/structured_objectwriter.h \
|
||||
google/protobuf/util/internal/type_info.cc \
|
||||
google/protobuf/util/internal/type_info.h \
|
||||
@ -307,7 +307,9 @@ libprotobuf_la_SOURCES = \
|
||||
google/protobuf/util/json_util.cc \
|
||||
google/protobuf/util/message_differencer.cc \
|
||||
google/protobuf/util/time_util.cc \
|
||||
google/protobuf/util/type_resolver_util.cc
|
||||
google/protobuf/util/type_resolver_util.cc \
|
||||
google/protobuf/wire_format.cc \
|
||||
google/protobuf/wrappers.pb.cc
|
||||
|
||||
nodist_libprotobuf_la_SOURCES = $(nodist_libprotobuf_lite_la_SOURCES)
|
||||
|
||||
@ -320,13 +322,6 @@ endif
|
||||
libprotoc_la_SOURCES = \
|
||||
google/protobuf/compiler/code_generator.cc \
|
||||
google/protobuf/compiler/command_line_interface.cc \
|
||||
google/protobuf/compiler/plugin.cc \
|
||||
google/protobuf/compiler/plugin.pb.cc \
|
||||
google/protobuf/compiler/scc.h \
|
||||
google/protobuf/compiler/subprocess.cc \
|
||||
google/protobuf/compiler/subprocess.h \
|
||||
google/protobuf/compiler/zip_writer.cc \
|
||||
google/protobuf/compiler/zip_writer.h \
|
||||
google/protobuf/compiler/cpp/cpp_enum.cc \
|
||||
google/protobuf/compiler/cpp/cpp_enum.h \
|
||||
google/protobuf/compiler/cpp/cpp_enum_field.cc \
|
||||
@ -359,92 +354,6 @@ libprotoc_la_SOURCES = \
|
||||
google/protobuf/compiler/cpp/cpp_service.h \
|
||||
google/protobuf/compiler/cpp/cpp_string_field.cc \
|
||||
google/protobuf/compiler/cpp/cpp_string_field.h \
|
||||
google/protobuf/compiler/java/java_context.cc \
|
||||
google/protobuf/compiler/java/java_context.h \
|
||||
google/protobuf/compiler/java/java_enum.cc \
|
||||
google/protobuf/compiler/java/java_enum_lite.cc \
|
||||
google/protobuf/compiler/java/java_enum_field.cc \
|
||||
google/protobuf/compiler/java/java_enum_field.h \
|
||||
google/protobuf/compiler/java/java_enum_field_lite.cc \
|
||||
google/protobuf/compiler/java/java_enum_field_lite.h \
|
||||
google/protobuf/compiler/java/java_enum.h \
|
||||
google/protobuf/compiler/java/java_enum_lite.h \
|
||||
google/protobuf/compiler/java/java_extension.cc \
|
||||
google/protobuf/compiler/java/java_extension.h \
|
||||
google/protobuf/compiler/java/java_extension_lite.cc \
|
||||
google/protobuf/compiler/java/java_extension_lite.h \
|
||||
google/protobuf/compiler/java/java_field.cc \
|
||||
google/protobuf/compiler/java/java_field.h \
|
||||
google/protobuf/compiler/java/java_file.cc \
|
||||
google/protobuf/compiler/java/java_file.h \
|
||||
google/protobuf/compiler/java/java_generator.cc \
|
||||
google/protobuf/compiler/java/java_generator_factory.cc \
|
||||
google/protobuf/compiler/java/java_generator_factory.h \
|
||||
google/protobuf/compiler/java/java_helpers.cc \
|
||||
google/protobuf/compiler/java/java_helpers.h \
|
||||
google/protobuf/compiler/java/java_kotlin_generator.cc \
|
||||
google/protobuf/compiler/java/java_map_field.cc \
|
||||
google/protobuf/compiler/java/java_map_field.h \
|
||||
google/protobuf/compiler/java/java_map_field_lite.cc \
|
||||
google/protobuf/compiler/java/java_map_field_lite.h \
|
||||
google/protobuf/compiler/java/java_message.cc \
|
||||
google/protobuf/compiler/java/java_message_lite.cc \
|
||||
google/protobuf/compiler/java/java_message_builder.cc \
|
||||
google/protobuf/compiler/java/java_message_builder_lite.cc \
|
||||
google/protobuf/compiler/java/java_message_field.cc \
|
||||
google/protobuf/compiler/java/java_message_field.h \
|
||||
google/protobuf/compiler/java/java_message_field_lite.cc \
|
||||
google/protobuf/compiler/java/java_message_field_lite.h \
|
||||
google/protobuf/compiler/java/java_message.h \
|
||||
google/protobuf/compiler/java/java_message_lite.h \
|
||||
google/protobuf/compiler/java/java_message_builder.h \
|
||||
google/protobuf/compiler/java/java_message_builder_lite.h \
|
||||
google/protobuf/compiler/java/java_name_resolver.cc \
|
||||
google/protobuf/compiler/java/java_name_resolver.h \
|
||||
google/protobuf/compiler/java/java_options.h \
|
||||
google/protobuf/compiler/java/java_primitive_field.cc \
|
||||
google/protobuf/compiler/java/java_primitive_field.h \
|
||||
google/protobuf/compiler/java/java_primitive_field_lite.cc \
|
||||
google/protobuf/compiler/java/java_primitive_field_lite.h \
|
||||
google/protobuf/compiler/java/java_shared_code_generator.cc \
|
||||
google/protobuf/compiler/java/java_shared_code_generator.h \
|
||||
google/protobuf/compiler/java/java_service.cc \
|
||||
google/protobuf/compiler/java/java_service.h \
|
||||
google/protobuf/compiler/java/java_string_field.cc \
|
||||
google/protobuf/compiler/java/java_string_field.h \
|
||||
google/protobuf/compiler/java/java_string_field_lite.cc \
|
||||
google/protobuf/compiler/java/java_string_field_lite.h \
|
||||
google/protobuf/compiler/java/java_doc_comment.cc \
|
||||
google/protobuf/compiler/java/java_doc_comment.h \
|
||||
google/protobuf/compiler/js/js_generator.cc \
|
||||
google/protobuf/compiler/js/well_known_types_embed.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_enum.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_enum.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_enum_field.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_enum_field.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_extension.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_extension.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_field.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_field.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_file.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_file.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_generator.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_helpers.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_helpers.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_map_field.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_map_field.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_message.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_message.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_message_field.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_message_field.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_nsobject_methods.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_oneof.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_oneof.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_primitive_field.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_primitive_field.h \
|
||||
google/protobuf/compiler/php/php_generator.cc \
|
||||
google/protobuf/compiler/python/python_generator.cc \
|
||||
google/protobuf/compiler/ruby/ruby_generator.cc \
|
||||
google/protobuf/compiler/csharp/csharp_doc_comment.cc \
|
||||
google/protobuf/compiler/csharp/csharp_doc_comment.h \
|
||||
google/protobuf/compiler/csharp/csharp_enum.cc \
|
||||
@ -476,7 +385,100 @@ libprotoc_la_SOURCES = \
|
||||
google/protobuf/compiler/csharp/csharp_source_generator_base.cc \
|
||||
google/protobuf/compiler/csharp/csharp_source_generator_base.h \
|
||||
google/protobuf/compiler/csharp/csharp_wrapper_field.cc \
|
||||
google/protobuf/compiler/csharp/csharp_wrapper_field.h
|
||||
google/protobuf/compiler/csharp/csharp_wrapper_field.h \
|
||||
google/protobuf/compiler/java/java_context.cc \
|
||||
google/protobuf/compiler/java/java_context.h \
|
||||
google/protobuf/compiler/java/java_doc_comment.cc \
|
||||
google/protobuf/compiler/java/java_doc_comment.h \
|
||||
google/protobuf/compiler/java/java_enum.cc \
|
||||
google/protobuf/compiler/java/java_enum.h \
|
||||
google/protobuf/compiler/java/java_enum_field.cc \
|
||||
google/protobuf/compiler/java/java_enum_field.h \
|
||||
google/protobuf/compiler/java/java_enum_field_lite.cc \
|
||||
google/protobuf/compiler/java/java_enum_field_lite.h \
|
||||
google/protobuf/compiler/java/java_enum_lite.cc \
|
||||
google/protobuf/compiler/java/java_enum_lite.h \
|
||||
google/protobuf/compiler/java/java_extension.cc \
|
||||
google/protobuf/compiler/java/java_extension.h \
|
||||
google/protobuf/compiler/java/java_extension_lite.cc \
|
||||
google/protobuf/compiler/java/java_extension_lite.h \
|
||||
google/protobuf/compiler/java/java_field.cc \
|
||||
google/protobuf/compiler/java/java_field.h \
|
||||
google/protobuf/compiler/java/java_file.cc \
|
||||
google/protobuf/compiler/java/java_file.h \
|
||||
google/protobuf/compiler/java/java_generator.cc \
|
||||
google/protobuf/compiler/java/java_generator_factory.cc \
|
||||
google/protobuf/compiler/java/java_generator_factory.h \
|
||||
google/protobuf/compiler/java/java_helpers.cc \
|
||||
google/protobuf/compiler/java/java_helpers.h \
|
||||
google/protobuf/compiler/java/java_kotlin_generator.cc \
|
||||
google/protobuf/compiler/java/java_map_field.cc \
|
||||
google/protobuf/compiler/java/java_map_field.h \
|
||||
google/protobuf/compiler/java/java_map_field_lite.cc \
|
||||
google/protobuf/compiler/java/java_map_field_lite.h \
|
||||
google/protobuf/compiler/java/java_message.cc \
|
||||
google/protobuf/compiler/java/java_message.h \
|
||||
google/protobuf/compiler/java/java_message_builder.cc \
|
||||
google/protobuf/compiler/java/java_message_builder.h \
|
||||
google/protobuf/compiler/java/java_message_builder_lite.cc \
|
||||
google/protobuf/compiler/java/java_message_builder_lite.h \
|
||||
google/protobuf/compiler/java/java_message_field.cc \
|
||||
google/protobuf/compiler/java/java_message_field.h \
|
||||
google/protobuf/compiler/java/java_message_field_lite.cc \
|
||||
google/protobuf/compiler/java/java_message_field_lite.h \
|
||||
google/protobuf/compiler/java/java_message_lite.cc \
|
||||
google/protobuf/compiler/java/java_message_lite.h \
|
||||
google/protobuf/compiler/java/java_name_resolver.cc \
|
||||
google/protobuf/compiler/java/java_name_resolver.h \
|
||||
google/protobuf/compiler/java/java_options.h \
|
||||
google/protobuf/compiler/java/java_primitive_field.cc \
|
||||
google/protobuf/compiler/java/java_primitive_field.h \
|
||||
google/protobuf/compiler/java/java_primitive_field_lite.cc \
|
||||
google/protobuf/compiler/java/java_primitive_field_lite.h \
|
||||
google/protobuf/compiler/java/java_service.cc \
|
||||
google/protobuf/compiler/java/java_service.h \
|
||||
google/protobuf/compiler/java/java_shared_code_generator.cc \
|
||||
google/protobuf/compiler/java/java_shared_code_generator.h \
|
||||
google/protobuf/compiler/java/java_string_field.cc \
|
||||
google/protobuf/compiler/java/java_string_field.h \
|
||||
google/protobuf/compiler/java/java_string_field_lite.cc \
|
||||
google/protobuf/compiler/java/java_string_field_lite.h \
|
||||
google/protobuf/compiler/js/js_generator.cc \
|
||||
google/protobuf/compiler/js/well_known_types_embed.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_enum.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_enum.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_enum_field.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_enum_field.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_extension.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_extension.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_field.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_field.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_file.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_file.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_generator.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_helpers.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_helpers.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_map_field.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_map_field.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_message.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_message.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_message_field.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_message_field.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_nsobject_methods.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_oneof.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_oneof.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_primitive_field.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_primitive_field.h \
|
||||
google/protobuf/compiler/php/php_generator.cc \
|
||||
google/protobuf/compiler/plugin.cc \
|
||||
google/protobuf/compiler/plugin.pb.cc \
|
||||
google/protobuf/compiler/python/python_generator.cc \
|
||||
google/protobuf/compiler/ruby/ruby_generator.cc \
|
||||
google/protobuf/compiler/scc.h \
|
||||
google/protobuf/compiler/subprocess.cc \
|
||||
google/protobuf/compiler/subprocess.h \
|
||||
google/protobuf/compiler/zip_writer.cc \
|
||||
google/protobuf/compiler/zip_writer.h
|
||||
|
||||
bin_PROGRAMS = protoc
|
||||
protoc_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la
|
||||
@ -487,32 +489,33 @@ protoc_SOURCES = google/protobuf/compiler/main.cc
|
||||
protoc_inputs = \
|
||||
google/protobuf/any_test.proto \
|
||||
google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto \
|
||||
google/protobuf/compiler/cpp/cpp_test_large_enum_value.proto \
|
||||
google/protobuf/map_lite_unittest.proto \
|
||||
google/protobuf/map_proto2_unittest.proto \
|
||||
google/protobuf/map_unittest.proto \
|
||||
google/protobuf/unittest.proto \
|
||||
google/protobuf/unittest_arena.proto \
|
||||
google/protobuf/unittest_custom_options.proto \
|
||||
google/protobuf/unittest_drop_unknown_fields.proto \
|
||||
google/protobuf/unittest_embed_optimize_for.proto \
|
||||
google/protobuf/unittest_empty.proto \
|
||||
google/protobuf/unittest_enormous_descriptor.proto \
|
||||
google/protobuf/unittest_import_lite.proto \
|
||||
google/protobuf/unittest_import.proto \
|
||||
google/protobuf/unittest_import_public_lite.proto \
|
||||
google/protobuf/unittest_import_lite.proto \
|
||||
google/protobuf/unittest_import_public.proto \
|
||||
google/protobuf/unittest_import_public_lite.proto \
|
||||
google/protobuf/unittest_lazy_dependencies.proto \
|
||||
google/protobuf/unittest_lazy_dependencies_custom_option.proto \
|
||||
google/protobuf/unittest_lazy_dependencies_enum.proto \
|
||||
google/protobuf/unittest_lite_imports_nonlite.proto \
|
||||
google/protobuf/unittest_lite.proto \
|
||||
google/protobuf/unittest_lite_imports_nonlite.proto \
|
||||
google/protobuf/unittest_mset.proto \
|
||||
google/protobuf/unittest_mset_wire_format.proto \
|
||||
google/protobuf/unittest_no_field_presence.proto \
|
||||
google/protobuf/unittest_no_generic_services.proto \
|
||||
google/protobuf/unittest_optimize_for.proto \
|
||||
google/protobuf/unittest_preserve_unknown_enum2.proto \
|
||||
google/protobuf/unittest_preserve_unknown_enum.proto \
|
||||
google/protobuf/unittest.proto \
|
||||
google/protobuf/unittest_preserve_unknown_enum2.proto \
|
||||
google/protobuf/unittest_proto3.proto \
|
||||
google/protobuf/unittest_proto3_arena.proto \
|
||||
google/protobuf/unittest_proto3_arena_lite.proto \
|
||||
@ -532,32 +535,12 @@ protoc_inputs = \
|
||||
google/protobuf/util/internal/testdata/wrappers.proto \
|
||||
google/protobuf/util/json_format.proto \
|
||||
google/protobuf/util/json_format_proto3.proto \
|
||||
google/protobuf/util/message_differencer_unittest.proto \
|
||||
google/protobuf/compiler/cpp/cpp_test_large_enum_value.proto
|
||||
google/protobuf/util/message_differencer_unittest.proto
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(protoc_inputs) \
|
||||
solaris/libstdc++.la \
|
||||
google/protobuf/test_messages_proto3.proto \
|
||||
google/protobuf/test_messages_proto2.proto \
|
||||
google/protobuf/io/gzip_stream.h \
|
||||
google/protobuf/io/gzip_stream_unittest.sh \
|
||||
google/protobuf/testdata/golden_message \
|
||||
google/protobuf/testdata/golden_message_maps \
|
||||
google/protobuf/testdata/golden_message_oneof_implemented \
|
||||
google/protobuf/testdata/golden_message_proto3 \
|
||||
google/protobuf/testdata/golden_packed_fields_message \
|
||||
google/protobuf/testdata/bad_utf8_string \
|
||||
google/protobuf/testdata/map_test_data.txt \
|
||||
google/protobuf/testdata/text_format_unittest_data.txt \
|
||||
google/protobuf/testdata/text_format_unittest_data_oneof_implemented.txt \
|
||||
google/protobuf/testdata/text_format_unittest_data_pointy.txt \
|
||||
google/protobuf/testdata/text_format_unittest_data_pointy_oneof.txt \
|
||||
google/protobuf/testdata/text_format_unittest_extensions_data.txt \
|
||||
google/protobuf/testdata/text_format_unittest_extensions_data_pointy.txt \
|
||||
google/protobuf/package_info.h \
|
||||
google/protobuf/io/package_info.h \
|
||||
google/protobuf/util/package_info.h \
|
||||
google/protobuf/compiler/package_info.h \
|
||||
google/protobuf/compiler/ruby/ruby_generated_code.proto \
|
||||
google/protobuf/compiler/ruby/ruby_generated_code_pb.rb \
|
||||
google/protobuf/compiler/ruby/ruby_generated_code_proto2.proto \
|
||||
@ -568,8 +551,27 @@ EXTRA_DIST = \
|
||||
google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_pb.rb \
|
||||
google/protobuf/compiler/ruby/ruby_generated_pkg_implicit.proto \
|
||||
google/protobuf/compiler/ruby/ruby_generated_pkg_implicit_pb.rb \
|
||||
google/protobuf/compiler/package_info.h \
|
||||
google/protobuf/compiler/zip_output_unittest.sh \
|
||||
google/protobuf/io/gzip_stream.h \
|
||||
google/protobuf/io/gzip_stream_unittest.sh \
|
||||
google/protobuf/io/package_info.h \
|
||||
google/protobuf/package_info.h \
|
||||
google/protobuf/test_messages_proto2.proto \
|
||||
google/protobuf/test_messages_proto3.proto \
|
||||
google/protobuf/testdata/bad_utf8_string \
|
||||
google/protobuf/testdata/golden_message \
|
||||
google/protobuf/testdata/golden_message_maps \
|
||||
google/protobuf/testdata/golden_message_oneof_implemented \
|
||||
google/protobuf/testdata/golden_message_proto3 \
|
||||
google/protobuf/testdata/golden_packed_fields_message \
|
||||
google/protobuf/testdata/map_test_data.txt \
|
||||
google/protobuf/testdata/text_format_unittest_data.txt \
|
||||
google/protobuf/testdata/text_format_unittest_data_oneof_implemented.txt \
|
||||
google/protobuf/testdata/text_format_unittest_data_pointy.txt \
|
||||
google/protobuf/testdata/text_format_unittest_data_pointy_oneof.txt \
|
||||
google/protobuf/testdata/text_format_unittest_extensions_data.txt \
|
||||
google/protobuf/testdata/text_format_unittest_extensions_data_pointy.txt \
|
||||
google/protobuf/util/package_info.h \
|
||||
libprotobuf-lite.map \
|
||||
libprotobuf.map \
|
||||
libprotoc.map \
|
||||
@ -578,12 +580,12 @@ EXTRA_DIST = \
|
||||
protoc_lite_outputs = \
|
||||
google/protobuf/map_lite_unittest.pb.cc \
|
||||
google/protobuf/map_lite_unittest.pb.h \
|
||||
google/protobuf/unittest_lite.pb.cc \
|
||||
google/protobuf/unittest_lite.pb.h \
|
||||
google/protobuf/unittest_import_lite.pb.cc \
|
||||
google/protobuf/unittest_import_lite.pb.h \
|
||||
google/protobuf/unittest_import_public_lite.pb.cc \
|
||||
google/protobuf/unittest_import_public_lite.pb.h
|
||||
google/protobuf/unittest_import_public_lite.pb.h \
|
||||
google/protobuf/unittest_lite.pb.cc \
|
||||
google/protobuf/unittest_lite.pb.h
|
||||
|
||||
protoc_outputs = \
|
||||
$(protoc_lite_outputs) \
|
||||
@ -597,6 +599,8 @@ protoc_outputs = \
|
||||
google/protobuf/map_proto2_unittest.pb.h \
|
||||
google/protobuf/map_unittest.pb.cc \
|
||||
google/protobuf/map_unittest.pb.h \
|
||||
google/protobuf/unittest.pb.cc \
|
||||
google/protobuf/unittest.pb.h \
|
||||
google/protobuf/unittest_arena.pb.cc \
|
||||
google/protobuf/unittest_arena.pb.h \
|
||||
google/protobuf/unittest_custom_options.pb.cc \
|
||||
@ -631,12 +635,10 @@ protoc_outputs = \
|
||||
google/protobuf/unittest_no_generic_services.pb.h \
|
||||
google/protobuf/unittest_optimize_for.pb.cc \
|
||||
google/protobuf/unittest_optimize_for.pb.h \
|
||||
google/protobuf/unittest.pb.cc \
|
||||
google/protobuf/unittest.pb.h \
|
||||
google/protobuf/unittest_preserve_unknown_enum2.pb.cc \
|
||||
google/protobuf/unittest_preserve_unknown_enum2.pb.h \
|
||||
google/protobuf/unittest_preserve_unknown_enum.pb.cc \
|
||||
google/protobuf/unittest_preserve_unknown_enum.pb.h \
|
||||
google/protobuf/unittest_preserve_unknown_enum2.pb.cc \
|
||||
google/protobuf/unittest_preserve_unknown_enum2.pb.h \
|
||||
google/protobuf/unittest_proto3.pb.cc \
|
||||
google/protobuf/unittest_proto3.pb.h \
|
||||
google/protobuf/unittest_proto3_arena.pb.cc \
|
||||
@ -700,8 +702,8 @@ $(protoc_outputs): unittest_proto_middleman
|
||||
COMMON_TEST_SOURCES = \
|
||||
google/protobuf/arena_test_util.cc \
|
||||
google/protobuf/arena_test_util.h \
|
||||
google/protobuf/map_test_util.inc \
|
||||
google/protobuf/map_test_util.h \
|
||||
google/protobuf/map_test_util.inc \
|
||||
google/protobuf/map_test_util_impl.h \
|
||||
google/protobuf/reflection_tester.cc \
|
||||
google/protobuf/reflection_tester.h \
|
||||
@ -709,10 +711,10 @@ COMMON_TEST_SOURCES = \
|
||||
google/protobuf/test_util.h \
|
||||
google/protobuf/test_util.inc \
|
||||
google/protobuf/test_util2.h \
|
||||
google/protobuf/testing/googletest.cc \
|
||||
google/protobuf/testing/googletest.h \
|
||||
google/protobuf/testing/file.cc \
|
||||
google/protobuf/testing/file.h
|
||||
google/protobuf/testing/file.h \
|
||||
google/protobuf/testing/googletest.cc \
|
||||
google/protobuf/testing/googletest.h
|
||||
|
||||
GOOGLETEST_BUILD_DIR=../third_party/googletest/googletest
|
||||
GOOGLEMOCK_BUILD_DIR=../third_party/googletest/googlemock
|
||||
@ -731,25 +733,31 @@ protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \
|
||||
# since test_util.cc takes forever to compile with optimization (with GCC).
|
||||
# See configure.ac for more info.
|
||||
protobuf_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
|
||||
# Doesn't pass on Windows with MSVC
|
||||
NON_MSVC_TEST_SOURCES = \
|
||||
google/protobuf/compiler/command_line_interface_unittest.cc
|
||||
protobuf_test_SOURCES = \
|
||||
google/protobuf/stubs/bytestream_unittest.cc \
|
||||
google/protobuf/stubs/common_unittest.cc \
|
||||
google/protobuf/stubs/int128_unittest.cc \
|
||||
google/protobuf/io/io_win32_unittest.cc \
|
||||
google/protobuf/stubs/statusor_test.cc \
|
||||
google/protobuf/stubs/status_test.cc \
|
||||
google/protobuf/stubs/stringpiece_unittest.cc \
|
||||
google/protobuf/stubs/stringprintf_unittest.cc \
|
||||
google/protobuf/stubs/structurally_valid_unittest.cc \
|
||||
google/protobuf/stubs/strutil_unittest.cc \
|
||||
google/protobuf/stubs/template_util_unittest.cc \
|
||||
google/protobuf/stubs/time_test.cc \
|
||||
google/protobuf/any_test.cc \
|
||||
google/protobuf/arenastring_unittest.cc \
|
||||
google/protobuf/arena_unittest.cc \
|
||||
google/protobuf/arenastring_unittest.cc \
|
||||
google/protobuf/compiler/annotation_test_util.cc \
|
||||
google/protobuf/compiler/annotation_test_util.h \
|
||||
google/protobuf/compiler/command_line_interface_unittest.cc \
|
||||
google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc \
|
||||
google/protobuf/compiler/cpp/cpp_move_unittest.cc \
|
||||
google/protobuf/compiler/cpp/cpp_plugin_unittest.cc \
|
||||
google/protobuf/compiler/cpp/cpp_unittest.cc \
|
||||
google/protobuf/compiler/cpp/cpp_unittest.h \
|
||||
google/protobuf/compiler/cpp/cpp_unittest.inc \
|
||||
google/protobuf/compiler/cpp/metadata_test.cc \
|
||||
google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc \
|
||||
google/protobuf/compiler/csharp/csharp_generator_unittest.cc \
|
||||
google/protobuf/compiler/importer_unittest.cc \
|
||||
google/protobuf/compiler/java/java_doc_comment_unittest.cc \
|
||||
google/protobuf/compiler/java/java_plugin_unittest.cc \
|
||||
google/protobuf/compiler/mock_code_generator.cc \
|
||||
google/protobuf/compiler/mock_code_generator.h \
|
||||
google/protobuf/compiler/objectivec/objectivec_helpers_unittest.cc \
|
||||
google/protobuf/compiler/parser_unittest.cc \
|
||||
google/protobuf/compiler/python/python_plugin_unittest.cc \
|
||||
google/protobuf/compiler/ruby/ruby_generator_unittest.cc \
|
||||
google/protobuf/descriptor_database_unittest.cc \
|
||||
google/protobuf/descriptor_unittest.cc \
|
||||
google/protobuf/drop_unknown_fields_test.cc \
|
||||
@ -757,6 +765,11 @@ protobuf_test_SOURCES = \
|
||||
google/protobuf/extension_set_unittest.cc \
|
||||
google/protobuf/generated_message_reflection_unittest.cc \
|
||||
google/protobuf/inlined_string_field_unittest.cc \
|
||||
google/protobuf/io/coded_stream_unittest.cc \
|
||||
google/protobuf/io/io_win32_unittest.cc \
|
||||
google/protobuf/io/printer_unittest.cc \
|
||||
google/protobuf/io/tokenizer_unittest.cc \
|
||||
google/protobuf/io/zero_copy_stream_unittest.cc \
|
||||
google/protobuf/map_field_test.cc \
|
||||
google/protobuf/map_test.cc \
|
||||
google/protobuf/message_unittest.cc \
|
||||
@ -770,35 +783,19 @@ protobuf_test_SOURCES = \
|
||||
google/protobuf/reflection_ops_unittest.cc \
|
||||
google/protobuf/repeated_field_reflection_unittest.cc \
|
||||
google/protobuf/repeated_field_unittest.cc \
|
||||
google/protobuf/stubs/bytestream_unittest.cc \
|
||||
google/protobuf/stubs/common_unittest.cc \
|
||||
google/protobuf/stubs/int128_unittest.cc \
|
||||
google/protobuf/stubs/status_test.cc \
|
||||
google/protobuf/stubs/statusor_test.cc \
|
||||
google/protobuf/stubs/stringpiece_unittest.cc \
|
||||
google/protobuf/stubs/stringprintf_unittest.cc \
|
||||
google/protobuf/stubs/structurally_valid_unittest.cc \
|
||||
google/protobuf/stubs/strutil_unittest.cc \
|
||||
google/protobuf/stubs/template_util_unittest.cc \
|
||||
google/protobuf/stubs/time_test.cc \
|
||||
google/protobuf/text_format_unittest.cc \
|
||||
google/protobuf/unknown_field_set_unittest.cc \
|
||||
google/protobuf/well_known_types_unittest.cc \
|
||||
google/protobuf/wire_format_unittest.cc \
|
||||
google/protobuf/wire_format_unittest.inc \
|
||||
google/protobuf/io/coded_stream_unittest.cc \
|
||||
google/protobuf/io/printer_unittest.cc \
|
||||
google/protobuf/io/tokenizer_unittest.cc \
|
||||
google/protobuf/io/zero_copy_stream_unittest.cc \
|
||||
google/protobuf/compiler/annotation_test_util.h \
|
||||
google/protobuf/compiler/annotation_test_util.cc \
|
||||
google/protobuf/compiler/importer_unittest.cc \
|
||||
google/protobuf/compiler/mock_code_generator.cc \
|
||||
google/protobuf/compiler/mock_code_generator.h \
|
||||
google/protobuf/compiler/parser_unittest.cc \
|
||||
google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc \
|
||||
google/protobuf/compiler/cpp/cpp_move_unittest.cc \
|
||||
google/protobuf/compiler/cpp/cpp_unittest.h \
|
||||
google/protobuf/compiler/cpp/cpp_unittest.cc \
|
||||
google/protobuf/compiler/cpp/cpp_unittest.inc \
|
||||
google/protobuf/compiler/cpp/cpp_plugin_unittest.cc \
|
||||
google/protobuf/compiler/cpp/metadata_test.cc \
|
||||
google/protobuf/compiler/java/java_plugin_unittest.cc \
|
||||
google/protobuf/compiler/java/java_doc_comment_unittest.cc \
|
||||
google/protobuf/compiler/objectivec/objectivec_helpers_unittest.cc \
|
||||
google/protobuf/compiler/python/python_plugin_unittest.cc \
|
||||
google/protobuf/compiler/ruby/ruby_generator_unittest.cc \
|
||||
google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc \
|
||||
google/protobuf/compiler/csharp/csharp_generator_unittest.cc \
|
||||
google/protobuf/util/delimited_message_util_test.cc \
|
||||
google/protobuf/util/field_comparator_test.cc \
|
||||
google/protobuf/util/field_mask_util_test.cc \
|
||||
@ -812,8 +809,11 @@ protobuf_test_SOURCES = \
|
||||
google/protobuf/util/message_differencer_unittest.cc \
|
||||
google/protobuf/util/time_util_test.cc \
|
||||
google/protobuf/util/type_resolver_util_test.cc \
|
||||
$(NON_MSVC_TEST_SOURCES) \
|
||||
google/protobuf/well_known_types_unittest.cc \
|
||||
google/protobuf/wire_format_unittest.cc \
|
||||
google/protobuf/wire_format_unittest.inc \
|
||||
$(COMMON_TEST_SOURCES)
|
||||
|
||||
nodist_protobuf_test_SOURCES = $(protoc_outputs)
|
||||
$(am_protobuf_test_OBJECTS): unittest_proto_middleman
|
||||
|
||||
@ -880,9 +880,9 @@ test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
|
||||
test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include
|
||||
test_plugin_SOURCES = \
|
||||
google/protobuf/compiler/mock_code_generator.cc \
|
||||
google/protobuf/compiler/test_plugin.cc \
|
||||
google/protobuf/testing/file.cc \
|
||||
google/protobuf/testing/file.h \
|
||||
google/protobuf/compiler/test_plugin.cc
|
||||
google/protobuf/testing/file.h
|
||||
|
||||
if HAVE_ZLIB
|
||||
zcgzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la
|
||||
@ -898,7 +898,8 @@ endif
|
||||
no_warning_test.cc:
|
||||
echo "// Generated from Makefile.am" > no_warning_test.cc
|
||||
for FILE in $(nobase_include_HEADERS); do \
|
||||
echo "#include <$${FILE}>" >> no_warning_test.cc; \
|
||||
case $$FILE in *.inc) continue;; esac; \
|
||||
echo "#include <$${FILE}>" >> no_warning_test.cc; \
|
||||
done
|
||||
echo "int main(int, char**) { return 0; }" >> no_warning_test.cc
|
||||
|
||||
|
@ -38,20 +38,20 @@ static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_s
|
||||
|
||||
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fany_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Any, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Any, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Any, type_url_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Any, value_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Any, type_url_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Any, value_),
|
||||
};
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
{ 0, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::Any)},
|
||||
{ 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Any)},
|
||||
};
|
||||
|
||||
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Any_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_Any_default_instance_),
|
||||
};
|
||||
|
||||
const char descriptor_table_protodef_google_2fprotobuf_2fany_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
||||
@ -331,8 +331,8 @@ void Any::InternalSwap(Any* other) {
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Any* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Any >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Any >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Any* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Any >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Any >(arena);
|
||||
}
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
|
@ -59,7 +59,7 @@ struct AnyDefaultTypeInternal;
|
||||
PROTOBUF_EXPORT extern AnyDefaultTypeInternal _Any_default_instance_;
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Any* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Any>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::Any* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Any>(Arena*);
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
|
||||
@ -84,7 +84,11 @@ class PROTOBUF_EXPORT Any final :
|
||||
}
|
||||
inline Any& operator=(Any&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
|
@ -75,50 +75,50 @@ static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_s
|
||||
|
||||
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fapi_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, name_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, methods_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, options_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, version_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, source_context_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, mixins_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, syntax_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, name_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, methods_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, options_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, version_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, source_context_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, mixins_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, syntax_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, name_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, request_type_url_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, request_streaming_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, response_type_url_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, response_streaming_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, options_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, syntax_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, name_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, request_type_url_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, request_streaming_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, response_type_url_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, response_streaming_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, options_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, syntax_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Mixin, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Mixin, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Mixin, name_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Mixin, root_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Mixin, name_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Mixin, root_),
|
||||
};
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
{ 0, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::Api)},
|
||||
{ 13, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::Method)},
|
||||
{ 26, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::Mixin)},
|
||||
{ 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Api)},
|
||||
{ 13, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Method)},
|
||||
{ 26, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Mixin)},
|
||||
};
|
||||
|
||||
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Api_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Method_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Mixin_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_Api_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_Method_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_Mixin_default_instance_),
|
||||
};
|
||||
|
||||
const char descriptor_table_protodef_google_2fprotobuf_2fapi_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
||||
@ -165,10 +165,10 @@ PROTOBUF_NAMESPACE_OPEN
|
||||
|
||||
class Api::_Internal {
|
||||
public:
|
||||
static const PROTOBUF_NAMESPACE_ID::SourceContext& source_context(const Api* msg);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::SourceContext& source_context(const Api* msg);
|
||||
};
|
||||
|
||||
const PROTOBUF_NAMESPACE_ID::SourceContext&
|
||||
const ::PROTOBUF_NAMESPACE_ID::SourceContext&
|
||||
Api::_Internal::source_context(const Api* msg) {
|
||||
return *msg->source_context_;
|
||||
}
|
||||
@ -210,7 +210,7 @@ Api::Api(const Api& from)
|
||||
GetArenaForAllocation());
|
||||
}
|
||||
if (from._internal_has_source_context()) {
|
||||
source_context_ = new PROTOBUF_NAMESPACE_ID::SourceContext(*from.source_context_);
|
||||
source_context_ = new ::PROTOBUF_NAMESPACE_ID::SourceContext(*from.source_context_);
|
||||
} else {
|
||||
source_context_ = nullptr;
|
||||
}
|
||||
@ -348,7 +348,7 @@ const char* Api::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::intern
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
|
||||
::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||||
CHK_(ptr);
|
||||
_internal_set_syntax(static_cast<PROTOBUF_NAMESPACE_ID::Syntax>(val));
|
||||
_internal_set_syntax(static_cast<::PROTOBUF_NAMESPACE_ID::Syntax>(val));
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
@ -536,7 +536,7 @@ void Api::MergeFrom(const Api& from) {
|
||||
_internal_set_version(from._internal_version());
|
||||
}
|
||||
if (from._internal_has_source_context()) {
|
||||
_internal_mutable_source_context()->PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(from._internal_source_context());
|
||||
_internal_mutable_source_context()->::PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(from._internal_source_context());
|
||||
}
|
||||
if (from._internal_syntax() != 0) {
|
||||
_internal_set_syntax(from._internal_syntax());
|
||||
@ -751,7 +751,7 @@ const char* Method::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
|
||||
::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||||
CHK_(ptr);
|
||||
_internal_set_syntax(static_cast<PROTOBUF_NAMESPACE_ID::Syntax>(val));
|
||||
_internal_set_syntax(static_cast<::PROTOBUF_NAMESPACE_ID::Syntax>(val));
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
@ -1234,14 +1234,14 @@ void Mixin::InternalSwap(Mixin* other) {
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Api* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Api >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Api >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Api* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Api >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Api >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Method* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Method >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Method >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Method* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Method >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Method >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Mixin* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Mixin >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Mixin >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Mixin* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Mixin >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Mixin >(arena);
|
||||
}
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
|
@ -67,9 +67,9 @@ struct MixinDefaultTypeInternal;
|
||||
PROTOBUF_EXPORT extern MixinDefaultTypeInternal _Mixin_default_instance_;
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Api* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Api>(Arena*);
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Method* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Method>(Arena*);
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Mixin* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Mixin>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::Api* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Api>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::Method* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Method>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::Mixin* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Mixin>(Arena*);
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
|
||||
@ -94,7 +94,11 @@ class PROTOBUF_EXPORT Api final :
|
||||
}
|
||||
inline Api& operator=(Api&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
@ -204,16 +208,16 @@ class PROTOBUF_EXPORT Api final :
|
||||
int _internal_methods_size() const;
|
||||
public:
|
||||
void clear_methods();
|
||||
PROTOBUF_NAMESPACE_ID::Method* mutable_methods(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Method >*
|
||||
::PROTOBUF_NAMESPACE_ID::Method* mutable_methods(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Method >*
|
||||
mutable_methods();
|
||||
private:
|
||||
const PROTOBUF_NAMESPACE_ID::Method& _internal_methods(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::Method* _internal_add_methods();
|
||||
const ::PROTOBUF_NAMESPACE_ID::Method& _internal_methods(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::Method* _internal_add_methods();
|
||||
public:
|
||||
const PROTOBUF_NAMESPACE_ID::Method& methods(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::Method* add_methods();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Method >&
|
||||
const ::PROTOBUF_NAMESPACE_ID::Method& methods(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::Method* add_methods();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Method >&
|
||||
methods() const;
|
||||
|
||||
// repeated .google.protobuf.Option options = 3;
|
||||
@ -222,16 +226,16 @@ class PROTOBUF_EXPORT Api final :
|
||||
int _internal_options_size() const;
|
||||
public:
|
||||
void clear_options();
|
||||
PROTOBUF_NAMESPACE_ID::Option* mutable_options(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >*
|
||||
::PROTOBUF_NAMESPACE_ID::Option* mutable_options(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >*
|
||||
mutable_options();
|
||||
private:
|
||||
const PROTOBUF_NAMESPACE_ID::Option& _internal_options(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::Option* _internal_add_options();
|
||||
const ::PROTOBUF_NAMESPACE_ID::Option& _internal_options(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::Option* _internal_add_options();
|
||||
public:
|
||||
const PROTOBUF_NAMESPACE_ID::Option& options(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::Option* add_options();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >&
|
||||
const ::PROTOBUF_NAMESPACE_ID::Option& options(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::Option* add_options();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >&
|
||||
options() const;
|
||||
|
||||
// repeated .google.protobuf.Mixin mixins = 6;
|
||||
@ -240,16 +244,16 @@ class PROTOBUF_EXPORT Api final :
|
||||
int _internal_mixins_size() const;
|
||||
public:
|
||||
void clear_mixins();
|
||||
PROTOBUF_NAMESPACE_ID::Mixin* mutable_mixins(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Mixin >*
|
||||
::PROTOBUF_NAMESPACE_ID::Mixin* mutable_mixins(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Mixin >*
|
||||
mutable_mixins();
|
||||
private:
|
||||
const PROTOBUF_NAMESPACE_ID::Mixin& _internal_mixins(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::Mixin* _internal_add_mixins();
|
||||
const ::PROTOBUF_NAMESPACE_ID::Mixin& _internal_mixins(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::Mixin* _internal_add_mixins();
|
||||
public:
|
||||
const PROTOBUF_NAMESPACE_ID::Mixin& mixins(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::Mixin* add_mixins();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Mixin >&
|
||||
const ::PROTOBUF_NAMESPACE_ID::Mixin& mixins(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::Mixin* add_mixins();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Mixin >&
|
||||
mixins() const;
|
||||
|
||||
// string name = 1;
|
||||
@ -286,25 +290,25 @@ class PROTOBUF_EXPORT Api final :
|
||||
bool _internal_has_source_context() const;
|
||||
public:
|
||||
void clear_source_context();
|
||||
const PROTOBUF_NAMESPACE_ID::SourceContext& source_context() const;
|
||||
PROTOBUF_MUST_USE_RESULT PROTOBUF_NAMESPACE_ID::SourceContext* release_source_context();
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* mutable_source_context();
|
||||
void set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceContext* source_context);
|
||||
const ::PROTOBUF_NAMESPACE_ID::SourceContext& source_context() const;
|
||||
PROTOBUF_MUST_USE_RESULT ::PROTOBUF_NAMESPACE_ID::SourceContext* release_source_context();
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* mutable_source_context();
|
||||
void set_allocated_source_context(::PROTOBUF_NAMESPACE_ID::SourceContext* source_context);
|
||||
private:
|
||||
const PROTOBUF_NAMESPACE_ID::SourceContext& _internal_source_context() const;
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* _internal_mutable_source_context();
|
||||
const ::PROTOBUF_NAMESPACE_ID::SourceContext& _internal_source_context() const;
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* _internal_mutable_source_context();
|
||||
public:
|
||||
void unsafe_arena_set_allocated_source_context(
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* source_context);
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* unsafe_arena_release_source_context();
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* source_context);
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* unsafe_arena_release_source_context();
|
||||
|
||||
// .google.protobuf.Syntax syntax = 7;
|
||||
void clear_syntax();
|
||||
PROTOBUF_NAMESPACE_ID::Syntax syntax() const;
|
||||
void set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value);
|
||||
::PROTOBUF_NAMESPACE_ID::Syntax syntax() const;
|
||||
void set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value);
|
||||
private:
|
||||
PROTOBUF_NAMESPACE_ID::Syntax _internal_syntax() const;
|
||||
void _internal_set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value);
|
||||
::PROTOBUF_NAMESPACE_ID::Syntax _internal_syntax() const;
|
||||
void _internal_set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value);
|
||||
public:
|
||||
|
||||
// @@protoc_insertion_point(class_scope:google.protobuf.Api)
|
||||
@ -314,12 +318,12 @@ class PROTOBUF_EXPORT Api final :
|
||||
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
|
||||
typedef void InternalArenaConstructable_;
|
||||
typedef void DestructorSkippable_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Method > methods_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option > options_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Mixin > mixins_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Method > methods_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option > options_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Mixin > mixins_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr version_;
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* source_context_;
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* source_context_;
|
||||
int syntax_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
friend struct ::TableStruct_google_2fprotobuf_2fapi_2eproto;
|
||||
@ -345,7 +349,11 @@ class PROTOBUF_EXPORT Method final :
|
||||
}
|
||||
inline Method& operator=(Method&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
@ -455,16 +463,16 @@ class PROTOBUF_EXPORT Method final :
|
||||
int _internal_options_size() const;
|
||||
public:
|
||||
void clear_options();
|
||||
PROTOBUF_NAMESPACE_ID::Option* mutable_options(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >*
|
||||
::PROTOBUF_NAMESPACE_ID::Option* mutable_options(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >*
|
||||
mutable_options();
|
||||
private:
|
||||
const PROTOBUF_NAMESPACE_ID::Option& _internal_options(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::Option* _internal_add_options();
|
||||
const ::PROTOBUF_NAMESPACE_ID::Option& _internal_options(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::Option* _internal_add_options();
|
||||
public:
|
||||
const PROTOBUF_NAMESPACE_ID::Option& options(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::Option* add_options();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >&
|
||||
const ::PROTOBUF_NAMESPACE_ID::Option& options(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::Option* add_options();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >&
|
||||
options() const;
|
||||
|
||||
// string name = 1;
|
||||
@ -529,11 +537,11 @@ class PROTOBUF_EXPORT Method final :
|
||||
|
||||
// .google.protobuf.Syntax syntax = 7;
|
||||
void clear_syntax();
|
||||
PROTOBUF_NAMESPACE_ID::Syntax syntax() const;
|
||||
void set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value);
|
||||
::PROTOBUF_NAMESPACE_ID::Syntax syntax() const;
|
||||
void set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value);
|
||||
private:
|
||||
PROTOBUF_NAMESPACE_ID::Syntax _internal_syntax() const;
|
||||
void _internal_set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value);
|
||||
::PROTOBUF_NAMESPACE_ID::Syntax _internal_syntax() const;
|
||||
void _internal_set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value);
|
||||
public:
|
||||
|
||||
// @@protoc_insertion_point(class_scope:google.protobuf.Method)
|
||||
@ -543,7 +551,7 @@ class PROTOBUF_EXPORT Method final :
|
||||
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
|
||||
typedef void InternalArenaConstructable_;
|
||||
typedef void DestructorSkippable_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option > options_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option > options_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr request_type_url_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr response_type_url_;
|
||||
@ -574,7 +582,11 @@ class PROTOBUF_EXPORT Mixin final :
|
||||
}
|
||||
inline Mixin& operator=(Mixin&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
@ -780,31 +792,31 @@ inline int Api::methods_size() const {
|
||||
inline void Api::clear_methods() {
|
||||
methods_.Clear();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Method* Api::mutable_methods(int index) {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Method* Api::mutable_methods(int index) {
|
||||
// @@protoc_insertion_point(field_mutable:google.protobuf.Api.methods)
|
||||
return methods_.Mutable(index);
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Method >*
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Method >*
|
||||
Api::mutable_methods() {
|
||||
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.methods)
|
||||
return &methods_;
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Method& Api::_internal_methods(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Method& Api::_internal_methods(int index) const {
|
||||
return methods_.Get(index);
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Method& Api::methods(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Method& Api::methods(int index) const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.Api.methods)
|
||||
return _internal_methods(index);
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Method* Api::_internal_add_methods() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Method* Api::_internal_add_methods() {
|
||||
return methods_.Add();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Method* Api::add_methods() {
|
||||
PROTOBUF_NAMESPACE_ID::Method* _add = _internal_add_methods();
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Method* Api::add_methods() {
|
||||
::PROTOBUF_NAMESPACE_ID::Method* _add = _internal_add_methods();
|
||||
// @@protoc_insertion_point(field_add:google.protobuf.Api.methods)
|
||||
return _add;
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Method >&
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Method >&
|
||||
Api::methods() const {
|
||||
// @@protoc_insertion_point(field_list:google.protobuf.Api.methods)
|
||||
return methods_;
|
||||
@ -817,31 +829,31 @@ inline int Api::_internal_options_size() const {
|
||||
inline int Api::options_size() const {
|
||||
return _internal_options_size();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Option* Api::mutable_options(int index) {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Option* Api::mutable_options(int index) {
|
||||
// @@protoc_insertion_point(field_mutable:google.protobuf.Api.options)
|
||||
return options_.Mutable(index);
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >*
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >*
|
||||
Api::mutable_options() {
|
||||
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.options)
|
||||
return &options_;
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Option& Api::_internal_options(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Option& Api::_internal_options(int index) const {
|
||||
return options_.Get(index);
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Option& Api::options(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Option& Api::options(int index) const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.Api.options)
|
||||
return _internal_options(index);
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Option* Api::_internal_add_options() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Option* Api::_internal_add_options() {
|
||||
return options_.Add();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Option* Api::add_options() {
|
||||
PROTOBUF_NAMESPACE_ID::Option* _add = _internal_add_options();
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Option* Api::add_options() {
|
||||
::PROTOBUF_NAMESPACE_ID::Option* _add = _internal_add_options();
|
||||
// @@protoc_insertion_point(field_add:google.protobuf.Api.options)
|
||||
return _add;
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >&
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >&
|
||||
Api::options() const {
|
||||
// @@protoc_insertion_point(field_list:google.protobuf.Api.options)
|
||||
return options_;
|
||||
@ -900,17 +912,17 @@ inline bool Api::_internal_has_source_context() const {
|
||||
inline bool Api::has_source_context() const {
|
||||
return _internal_has_source_context();
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::SourceContext& Api::_internal_source_context() const {
|
||||
const PROTOBUF_NAMESPACE_ID::SourceContext* p = source_context_;
|
||||
return p != nullptr ? *p : reinterpret_cast<const PROTOBUF_NAMESPACE_ID::SourceContext&>(
|
||||
PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_);
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::SourceContext& Api::_internal_source_context() const {
|
||||
const ::PROTOBUF_NAMESPACE_ID::SourceContext* p = source_context_;
|
||||
return p != nullptr ? *p : reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::SourceContext&>(
|
||||
::PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_);
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::SourceContext& Api::source_context() const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::SourceContext& Api::source_context() const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.Api.source_context)
|
||||
return _internal_source_context();
|
||||
}
|
||||
inline void Api::unsafe_arena_set_allocated_source_context(
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* source_context) {
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* source_context) {
|
||||
if (GetArenaForAllocation() == nullptr) {
|
||||
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context_);
|
||||
}
|
||||
@ -922,9 +934,9 @@ inline void Api::unsafe_arena_set_allocated_source_context(
|
||||
}
|
||||
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Api.source_context)
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::SourceContext* Api::release_source_context() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Api::release_source_context() {
|
||||
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* temp = source_context_;
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* temp = source_context_;
|
||||
source_context_ = nullptr;
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
|
||||
@ -937,27 +949,27 @@ inline PROTOBUF_NAMESPACE_ID::SourceContext* Api::release_source_context() {
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||
return temp;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::SourceContext* Api::unsafe_arena_release_source_context() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Api::unsafe_arena_release_source_context() {
|
||||
// @@protoc_insertion_point(field_release:google.protobuf.Api.source_context)
|
||||
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* temp = source_context_;
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* temp = source_context_;
|
||||
source_context_ = nullptr;
|
||||
return temp;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::SourceContext* Api::_internal_mutable_source_context() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Api::_internal_mutable_source_context() {
|
||||
|
||||
if (source_context_ == nullptr) {
|
||||
auto* p = CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::SourceContext>(GetArenaForAllocation());
|
||||
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::SourceContext>(GetArenaForAllocation());
|
||||
source_context_ = p;
|
||||
}
|
||||
return source_context_;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::SourceContext* Api::mutable_source_context() {
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* _msg = _internal_mutable_source_context();
|
||||
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Api::mutable_source_context() {
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* _msg = _internal_mutable_source_context();
|
||||
// @@protoc_insertion_point(field_mutable:google.protobuf.Api.source_context)
|
||||
return _msg;
|
||||
}
|
||||
inline void Api::set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceContext* source_context) {
|
||||
inline void Api::set_allocated_source_context(::PROTOBUF_NAMESPACE_ID::SourceContext* source_context) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context_);
|
||||
@ -989,31 +1001,31 @@ inline int Api::mixins_size() const {
|
||||
inline void Api::clear_mixins() {
|
||||
mixins_.Clear();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Mixin* Api::mutable_mixins(int index) {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Mixin* Api::mutable_mixins(int index) {
|
||||
// @@protoc_insertion_point(field_mutable:google.protobuf.Api.mixins)
|
||||
return mixins_.Mutable(index);
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Mixin >*
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Mixin >*
|
||||
Api::mutable_mixins() {
|
||||
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.mixins)
|
||||
return &mixins_;
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Mixin& Api::_internal_mixins(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Mixin& Api::_internal_mixins(int index) const {
|
||||
return mixins_.Get(index);
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Mixin& Api::mixins(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Mixin& Api::mixins(int index) const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.Api.mixins)
|
||||
return _internal_mixins(index);
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Mixin* Api::_internal_add_mixins() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Mixin* Api::_internal_add_mixins() {
|
||||
return mixins_.Add();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Mixin* Api::add_mixins() {
|
||||
PROTOBUF_NAMESPACE_ID::Mixin* _add = _internal_add_mixins();
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Mixin* Api::add_mixins() {
|
||||
::PROTOBUF_NAMESPACE_ID::Mixin* _add = _internal_add_mixins();
|
||||
// @@protoc_insertion_point(field_add:google.protobuf.Api.mixins)
|
||||
return _add;
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Mixin >&
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Mixin >&
|
||||
Api::mixins() const {
|
||||
// @@protoc_insertion_point(field_list:google.protobuf.Api.mixins)
|
||||
return mixins_;
|
||||
@ -1023,18 +1035,18 @@ Api::mixins() const {
|
||||
inline void Api::clear_syntax() {
|
||||
syntax_ = 0;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Syntax Api::_internal_syntax() const {
|
||||
return static_cast< PROTOBUF_NAMESPACE_ID::Syntax >(syntax_);
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Syntax Api::_internal_syntax() const {
|
||||
return static_cast< ::PROTOBUF_NAMESPACE_ID::Syntax >(syntax_);
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Syntax Api::syntax() const {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Syntax Api::syntax() const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.Api.syntax)
|
||||
return _internal_syntax();
|
||||
}
|
||||
inline void Api::_internal_set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) {
|
||||
inline void Api::_internal_set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value) {
|
||||
|
||||
syntax_ = value;
|
||||
}
|
||||
inline void Api::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) {
|
||||
inline void Api::set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value) {
|
||||
_internal_set_syntax(value);
|
||||
// @@protoc_insertion_point(field_set:google.protobuf.Api.syntax)
|
||||
}
|
||||
@ -1228,31 +1240,31 @@ inline int Method::_internal_options_size() const {
|
||||
inline int Method::options_size() const {
|
||||
return _internal_options_size();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Option* Method::mutable_options(int index) {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Option* Method::mutable_options(int index) {
|
||||
// @@protoc_insertion_point(field_mutable:google.protobuf.Method.options)
|
||||
return options_.Mutable(index);
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >*
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >*
|
||||
Method::mutable_options() {
|
||||
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Method.options)
|
||||
return &options_;
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Option& Method::_internal_options(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Option& Method::_internal_options(int index) const {
|
||||
return options_.Get(index);
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Option& Method::options(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Option& Method::options(int index) const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.Method.options)
|
||||
return _internal_options(index);
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Option* Method::_internal_add_options() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Option* Method::_internal_add_options() {
|
||||
return options_.Add();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Option* Method::add_options() {
|
||||
PROTOBUF_NAMESPACE_ID::Option* _add = _internal_add_options();
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Option* Method::add_options() {
|
||||
::PROTOBUF_NAMESPACE_ID::Option* _add = _internal_add_options();
|
||||
// @@protoc_insertion_point(field_add:google.protobuf.Method.options)
|
||||
return _add;
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >&
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >&
|
||||
Method::options() const {
|
||||
// @@protoc_insertion_point(field_list:google.protobuf.Method.options)
|
||||
return options_;
|
||||
@ -1262,18 +1274,18 @@ Method::options() const {
|
||||
inline void Method::clear_syntax() {
|
||||
syntax_ = 0;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Syntax Method::_internal_syntax() const {
|
||||
return static_cast< PROTOBUF_NAMESPACE_ID::Syntax >(syntax_);
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Syntax Method::_internal_syntax() const {
|
||||
return static_cast< ::PROTOBUF_NAMESPACE_ID::Syntax >(syntax_);
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Syntax Method::syntax() const {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Syntax Method::syntax() const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.Method.syntax)
|
||||
return _internal_syntax();
|
||||
}
|
||||
inline void Method::_internal_set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) {
|
||||
inline void Method::_internal_set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value) {
|
||||
|
||||
syntax_ = value;
|
||||
}
|
||||
inline void Method::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) {
|
||||
inline void Method::set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value) {
|
||||
_internal_set_syntax(value);
|
||||
// @@protoc_insertion_point(field_set:google.protobuf.Method.syntax)
|
||||
}
|
||||
|
@ -299,7 +299,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final {
|
||||
// We must delegate to CreateMaybeMessage() and NOT CreateMessageInternal()
|
||||
// because protobuf generated classes specialize CreateMaybeMessage() and we
|
||||
// need to use that specialization for code size reasons.
|
||||
return Arena::CreateMaybeMessage<T>(arena, std::forward<Args>(args)...);
|
||||
return Arena::CreateMaybeMessage<T>(arena, static_cast<Args&&>(args)...);
|
||||
}
|
||||
|
||||
// API to create any objects on the arena. Note that only the object will
|
||||
@ -320,7 +320,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final {
|
||||
template <typename T, typename... Args>
|
||||
PROTOBUF_NDEBUG_INLINE static T* Create(Arena* arena, Args&&... args) {
|
||||
return CreateInternal<T>(arena, std::is_convertible<T*, MessageLite*>(),
|
||||
std::forward<Args>(args)...);
|
||||
static_cast<Args&&>(args)...);
|
||||
}
|
||||
|
||||
// Create an array of object type T on the arena *without* invoking the
|
||||
@ -484,7 +484,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final {
|
||||
|
||||
template <typename... Args>
|
||||
static T* Construct(void* ptr, Args&&... args) {
|
||||
return new (ptr) T(std::forward<Args>(args)...);
|
||||
return new (ptr) T(static_cast<Args&&>(args)...);
|
||||
}
|
||||
|
||||
static T* New() {
|
||||
@ -528,9 +528,9 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final {
|
||||
InternalHelper<T>::is_arena_constructable::value,
|
||||
"CreateMessage can only construct types that are ArenaConstructable");
|
||||
if (arena == NULL) {
|
||||
return new T(nullptr, std::forward<Args>(args)...);
|
||||
return new T(nullptr, static_cast<Args&&>(args)...);
|
||||
} else {
|
||||
return arena->DoCreateMessage<T>(std::forward<Args>(args)...);
|
||||
return arena->DoCreateMessage<T>(static_cast<Args&&>(args)...);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1181,6 +1181,9 @@ void FileGenerator::GenerateLibraryIncludes(io::Printer* printer) {
|
||||
if (options_.force_inline_string || options_.profile_driven_inline_string) {
|
||||
IncludeFile("net/proto2/public/inlined_string_field.h", printer);
|
||||
}
|
||||
if (HasSimpleBaseClasses(file_, options_)) {
|
||||
IncludeFile("net/proto2/public/generated_message_bases.h", printer);
|
||||
}
|
||||
IncludeFile("net/proto2/public/generated_message_table_driven.h", printer);
|
||||
if (HasGeneratedMethods(file_, options_) &&
|
||||
options_.tctable_mode != Options::kTCTableNever) {
|
||||
|
@ -400,7 +400,7 @@ std::string Namespace(const FileDescriptor* d, const Options& options) {
|
||||
ret = StringReplace(ret,
|
||||
"::google::"
|
||||
"protobuf",
|
||||
"PROTOBUF_NAMESPACE_ID", false);
|
||||
"::PROTOBUF_NAMESPACE_ID", false);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -659,6 +659,15 @@ inline bool HasSimpleBaseClass(const Descriptor* desc, const Options& options) {
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool HasSimpleBaseClasses(const FileDescriptor* file,
|
||||
const Options& options) {
|
||||
bool v = false;
|
||||
ForEachMessage(file, [&v, &options](const Descriptor* desc) {
|
||||
v |= HasSimpleBaseClass(desc, options);
|
||||
});
|
||||
return v;
|
||||
}
|
||||
|
||||
inline std::string SimpleBaseClass(const Descriptor* desc,
|
||||
const Options& options) {
|
||||
if (!HasDescriptorMethods(desc->file(), options)) return "";
|
||||
|
@ -1460,7 +1460,11 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
|
||||
"}\n"
|
||||
"inline $classname$& operator=($classname$&& from) noexcept {\n"
|
||||
" if (this == &from) return *this;\n"
|
||||
" if (GetOwningArena() == from.GetOwningArena()) {\n"
|
||||
" if (GetOwningArena() == from.GetOwningArena()\n"
|
||||
"#ifdef PROTOBUF_FORCE_COPY_IN_MOVE\n"
|
||||
" && GetOwningArena() != nullptr\n"
|
||||
"#endif // !PROTOBUF_FORCE_COPY_IN_MOVE\n"
|
||||
" ) {\n"
|
||||
" InternalSwap(&from);\n"
|
||||
" } else {\n"
|
||||
" CopyFrom(from);\n"
|
||||
|
@ -214,7 +214,8 @@ TailCallTableInfo::TailCallTableInfo(const Descriptor* descriptor,
|
||||
|
||||
case FieldDescriptor::TYPE_BYTES:
|
||||
if (field->options().ctype() == FieldOptions::STRING &&
|
||||
field->default_value_string().empty()) {
|
||||
field->default_value_string().empty() &&
|
||||
!IsStringInlined(field, options)) {
|
||||
name = FieldParseFunctionName(field, options, table_size_log2);
|
||||
}
|
||||
break;
|
||||
@ -628,8 +629,9 @@ void ParseFunctionGenerator::GenerateArenaString(Formatter& format,
|
||||
int inlined_string_index = inlined_string_indices_[field->index()];
|
||||
GOOGLE_DCHECK_GE(inlined_string_index, 0);
|
||||
format(
|
||||
", $msg$_internal_$name$_donated(), &_inlined_string_donated_[$1$], "
|
||||
"~0x$2$u",
|
||||
", $msg$_internal_$name$_donated()"
|
||||
", &$msg$_inlined_string_donated_[$1$]"
|
||||
", ~0x$2$u",
|
||||
inlined_string_index / 32,
|
||||
strings::Hex(1u << (inlined_string_index % 32), strings::ZERO_PAD_8));
|
||||
}
|
||||
|
@ -510,7 +510,12 @@ TEST(GENERATED_MESSAGE_TEST_NAME, ADLSwap) {
|
||||
TestUtil::ExpectAllFieldsSet(message2);
|
||||
TestUtil::ExpectClear(message1);
|
||||
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_SWAP
|
||||
EXPECT_NE(addr, &message2.repeated_int32().Get(0));
|
||||
EXPECT_EQ(*addr, message2.repeated_int32().Get(0));
|
||||
#else
|
||||
EXPECT_EQ(addr, &message2.repeated_int32().Get(0));
|
||||
#endif
|
||||
}
|
||||
|
||||
TEST(GENERATED_MESSAGE_TEST_NAME, CopyConstructor) {
|
||||
@ -938,12 +943,12 @@ TEST(GENERATED_MESSAGE_TEST_NAME, TestOneofSpaceUsed) {
|
||||
|
||||
// Setting a message in oneof should delete the other fields and increase the
|
||||
// size by the size of the nested message type. NestedMessage is simple enough
|
||||
// that it is equal to sizeof(NestedMessage)
|
||||
// that it is equal to sizeof(NestedMessage). It may be backed by LazyField,
|
||||
// increasing space used by LazyField and backing Cord.
|
||||
message1.mutable_foo_message();
|
||||
ASSERT_EQ(sizeof(UNITTEST::TestOneof2::NestedMessage),
|
||||
message1.foo_message().SpaceUsedLong());
|
||||
EXPECT_EQ(empty_message_size +
|
||||
sizeof(UNITTEST::TestOneof2::NestedMessage),
|
||||
EXPECT_LE(empty_message_size + sizeof(UNITTEST::TestOneof2::NestedMessage),
|
||||
message1.SpaceUsedLong());
|
||||
}
|
||||
|
||||
|
@ -316,7 +316,6 @@ void ImmutableMessageGenerator::Generate(io::Printer* printer) {
|
||||
WriteMessageDocComment(printer, descriptor_);
|
||||
MaybePrintGeneratedAnnotation(context_, printer, descriptor_,
|
||||
/* immutable = */ true);
|
||||
|
||||
// The builder_type stores the super type name of the nested Builder class.
|
||||
std::string builder_type;
|
||||
if (descriptor_->extension_range_count() > 0) {
|
||||
|
@ -84,73 +84,73 @@ static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptor
|
||||
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto = nullptr;
|
||||
|
||||
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::Version, _has_bits_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::Version, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, _has_bits_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::Version, major_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::Version, minor_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::Version, patch_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::Version, suffix_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, major_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, minor_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, patch_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, suffix_),
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
0,
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, _has_bits_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, _has_bits_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, file_to_generate_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, parameter_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, proto_file_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, compiler_version_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, file_to_generate_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, parameter_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, proto_file_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, compiler_version_),
|
||||
~0u,
|
||||
0,
|
||||
~0u,
|
||||
1,
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, _has_bits_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, _has_bits_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, name_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, insertion_point_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, content_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, generated_code_info_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, name_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, insertion_point_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, content_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, generated_code_info_),
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, _has_bits_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, _has_bits_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, error_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, supported_features_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, file_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, error_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, supported_features_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, file_),
|
||||
0,
|
||||
1,
|
||||
~0u,
|
||||
};
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
{ 0, 10, -1, sizeof(PROTOBUF_NAMESPACE_ID::compiler::Version)},
|
||||
{ 14, 24, -1, sizeof(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest)},
|
||||
{ 28, 38, -1, sizeof(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File)},
|
||||
{ 42, 51, -1, sizeof(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse)},
|
||||
{ 0, 10, -1, sizeof(::PROTOBUF_NAMESPACE_ID::compiler::Version)},
|
||||
{ 14, 24, -1, sizeof(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest)},
|
||||
{ 28, 38, -1, sizeof(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File)},
|
||||
{ 42, 51, -1, sizeof(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse)},
|
||||
};
|
||||
|
||||
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::compiler::_Version_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorRequest_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorResponse_File_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorResponse_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::compiler::_Version_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorRequest_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorResponse_File_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorResponse_default_instance_),
|
||||
};
|
||||
|
||||
const char descriptor_table_protodef_google_2fprotobuf_2fcompiler_2fplugin_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
||||
@ -538,13 +538,13 @@ class CodeGeneratorRequest::_Internal {
|
||||
static void set_has_parameter(HasBits* has_bits) {
|
||||
(*has_bits)[0] |= 1u;
|
||||
}
|
||||
static const PROTOBUF_NAMESPACE_ID::compiler::Version& compiler_version(const CodeGeneratorRequest* msg);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::compiler::Version& compiler_version(const CodeGeneratorRequest* msg);
|
||||
static void set_has_compiler_version(HasBits* has_bits) {
|
||||
(*has_bits)[0] |= 2u;
|
||||
}
|
||||
};
|
||||
|
||||
const PROTOBUF_NAMESPACE_ID::compiler::Version&
|
||||
const ::PROTOBUF_NAMESPACE_ID::compiler::Version&
|
||||
CodeGeneratorRequest::_Internal::compiler_version(const CodeGeneratorRequest* msg) {
|
||||
return *msg->compiler_version_;
|
||||
}
|
||||
@ -574,7 +574,7 @@ CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from)
|
||||
GetArenaForAllocation());
|
||||
}
|
||||
if (from._internal_has_compiler_version()) {
|
||||
compiler_version_ = new PROTOBUF_NAMESPACE_ID::compiler::Version(*from.compiler_version_);
|
||||
compiler_version_ = new ::PROTOBUF_NAMESPACE_ID::compiler::Version(*from.compiler_version_);
|
||||
} else {
|
||||
compiler_version_ = nullptr;
|
||||
}
|
||||
@ -833,7 +833,7 @@ void CodeGeneratorRequest::MergeFrom(const CodeGeneratorRequest& from) {
|
||||
_internal_set_parameter(from._internal_parameter());
|
||||
}
|
||||
if (cached_has_bits & 0x00000002u) {
|
||||
_internal_mutable_compiler_version()->PROTOBUF_NAMESPACE_ID::compiler::Version::MergeFrom(from._internal_compiler_version());
|
||||
_internal_mutable_compiler_version()->::PROTOBUF_NAMESPACE_ID::compiler::Version::MergeFrom(from._internal_compiler_version());
|
||||
}
|
||||
}
|
||||
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||
@ -887,13 +887,13 @@ class CodeGeneratorResponse_File::_Internal {
|
||||
static void set_has_content(HasBits* has_bits) {
|
||||
(*has_bits)[0] |= 4u;
|
||||
}
|
||||
static const PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo& generated_code_info(const CodeGeneratorResponse_File* msg);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo& generated_code_info(const CodeGeneratorResponse_File* msg);
|
||||
static void set_has_generated_code_info(HasBits* has_bits) {
|
||||
(*has_bits)[0] |= 8u;
|
||||
}
|
||||
};
|
||||
|
||||
const PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo&
|
||||
const ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo&
|
||||
CodeGeneratorResponse_File::_Internal::generated_code_info(const CodeGeneratorResponse_File* msg) {
|
||||
return *msg->generated_code_info_;
|
||||
}
|
||||
@ -930,7 +930,7 @@ CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorRespon
|
||||
GetArenaForAllocation());
|
||||
}
|
||||
if (from._internal_has_generated_code_info()) {
|
||||
generated_code_info_ = new PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo(*from.generated_code_info_);
|
||||
generated_code_info_ = new ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo(*from.generated_code_info_);
|
||||
} else {
|
||||
generated_code_info_ = nullptr;
|
||||
}
|
||||
@ -1196,7 +1196,7 @@ void CodeGeneratorResponse_File::MergeFrom(const CodeGeneratorResponse_File& fro
|
||||
_internal_set_content(from._internal_content());
|
||||
}
|
||||
if (cached_has_bits & 0x00000008u) {
|
||||
_internal_mutable_generated_code_info()->PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo::MergeFrom(from._internal_generated_code_info());
|
||||
_internal_mutable_generated_code_info()->::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo::MergeFrom(from._internal_generated_code_info());
|
||||
}
|
||||
}
|
||||
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||
@ -1529,17 +1529,17 @@ void CodeGeneratorResponse::InternalSwap(CodeGeneratorResponse* other) {
|
||||
} // namespace compiler
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::compiler::Version* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::compiler::Version >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::compiler::Version >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::compiler::Version* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::compiler::Version >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::compiler::Version >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse >(arena);
|
||||
}
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
|
@ -78,10 +78,10 @@ PROTOC_EXPORT extern VersionDefaultTypeInternal _Version_default_instance_;
|
||||
} // namespace compiler
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOC_EXPORT PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest>(Arena*);
|
||||
template<> PROTOC_EXPORT PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse>(Arena*);
|
||||
template<> PROTOC_EXPORT PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File>(Arena*);
|
||||
template<> PROTOC_EXPORT PROTOBUF_NAMESPACE_ID::compiler::Version* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::compiler::Version>(Arena*);
|
||||
template<> PROTOC_EXPORT ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest>(Arena*);
|
||||
template<> PROTOC_EXPORT ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse>(Arena*);
|
||||
template<> PROTOC_EXPORT ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File>(Arena*);
|
||||
template<> PROTOC_EXPORT ::PROTOBUF_NAMESPACE_ID::compiler::Version* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::compiler::Version>(Arena*);
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
namespace compiler {
|
||||
@ -130,7 +130,11 @@ class PROTOC_EXPORT Version final :
|
||||
}
|
||||
inline Version& operator=(Version&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
@ -331,7 +335,11 @@ class PROTOC_EXPORT CodeGeneratorRequest final :
|
||||
}
|
||||
inline CodeGeneratorRequest& operator=(CodeGeneratorRequest&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
@ -469,16 +477,16 @@ class PROTOC_EXPORT CodeGeneratorRequest final :
|
||||
int _internal_proto_file_size() const;
|
||||
public:
|
||||
void clear_proto_file();
|
||||
PROTOBUF_NAMESPACE_ID::FileDescriptorProto* mutable_proto_file(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FileDescriptorProto >*
|
||||
::PROTOBUF_NAMESPACE_ID::FileDescriptorProto* mutable_proto_file(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto >*
|
||||
mutable_proto_file();
|
||||
private:
|
||||
const PROTOBUF_NAMESPACE_ID::FileDescriptorProto& _internal_proto_file(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::FileDescriptorProto* _internal_add_proto_file();
|
||||
const ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto& _internal_proto_file(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::FileDescriptorProto* _internal_add_proto_file();
|
||||
public:
|
||||
const PROTOBUF_NAMESPACE_ID::FileDescriptorProto& proto_file(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::FileDescriptorProto* add_proto_file();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FileDescriptorProto >&
|
||||
const ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto& proto_file(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::FileDescriptorProto* add_proto_file();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto >&
|
||||
proto_file() const;
|
||||
|
||||
// optional string parameter = 2;
|
||||
@ -505,17 +513,17 @@ class PROTOC_EXPORT CodeGeneratorRequest final :
|
||||
bool _internal_has_compiler_version() const;
|
||||
public:
|
||||
void clear_compiler_version();
|
||||
const PROTOBUF_NAMESPACE_ID::compiler::Version& compiler_version() const;
|
||||
PROTOBUF_MUST_USE_RESULT PROTOBUF_NAMESPACE_ID::compiler::Version* release_compiler_version();
|
||||
PROTOBUF_NAMESPACE_ID::compiler::Version* mutable_compiler_version();
|
||||
void set_allocated_compiler_version(PROTOBUF_NAMESPACE_ID::compiler::Version* compiler_version);
|
||||
const ::PROTOBUF_NAMESPACE_ID::compiler::Version& compiler_version() const;
|
||||
PROTOBUF_MUST_USE_RESULT ::PROTOBUF_NAMESPACE_ID::compiler::Version* release_compiler_version();
|
||||
::PROTOBUF_NAMESPACE_ID::compiler::Version* mutable_compiler_version();
|
||||
void set_allocated_compiler_version(::PROTOBUF_NAMESPACE_ID::compiler::Version* compiler_version);
|
||||
private:
|
||||
const PROTOBUF_NAMESPACE_ID::compiler::Version& _internal_compiler_version() const;
|
||||
PROTOBUF_NAMESPACE_ID::compiler::Version* _internal_mutable_compiler_version();
|
||||
const ::PROTOBUF_NAMESPACE_ID::compiler::Version& _internal_compiler_version() const;
|
||||
::PROTOBUF_NAMESPACE_ID::compiler::Version* _internal_mutable_compiler_version();
|
||||
public:
|
||||
void unsafe_arena_set_allocated_compiler_version(
|
||||
PROTOBUF_NAMESPACE_ID::compiler::Version* compiler_version);
|
||||
PROTOBUF_NAMESPACE_ID::compiler::Version* unsafe_arena_release_compiler_version();
|
||||
::PROTOBUF_NAMESPACE_ID::compiler::Version* compiler_version);
|
||||
::PROTOBUF_NAMESPACE_ID::compiler::Version* unsafe_arena_release_compiler_version();
|
||||
|
||||
// @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorRequest)
|
||||
private:
|
||||
@ -527,9 +535,9 @@ class PROTOC_EXPORT CodeGeneratorRequest final :
|
||||
::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string> file_to_generate_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FileDescriptorProto > proto_file_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto > proto_file_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr parameter_;
|
||||
PROTOBUF_NAMESPACE_ID::compiler::Version* compiler_version_;
|
||||
::PROTOBUF_NAMESPACE_ID::compiler::Version* compiler_version_;
|
||||
friend struct ::TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto;
|
||||
};
|
||||
// -------------------------------------------------------------------
|
||||
@ -553,7 +561,11 @@ class PROTOC_EXPORT CodeGeneratorResponse_File final :
|
||||
}
|
||||
inline CodeGeneratorResponse_File& operator=(CodeGeneratorResponse_File&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
@ -721,17 +733,17 @@ class PROTOC_EXPORT CodeGeneratorResponse_File final :
|
||||
bool _internal_has_generated_code_info() const;
|
||||
public:
|
||||
void clear_generated_code_info();
|
||||
const PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo& generated_code_info() const;
|
||||
PROTOBUF_MUST_USE_RESULT PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* release_generated_code_info();
|
||||
PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* mutable_generated_code_info();
|
||||
void set_allocated_generated_code_info(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* generated_code_info);
|
||||
const ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo& generated_code_info() const;
|
||||
PROTOBUF_MUST_USE_RESULT ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* release_generated_code_info();
|
||||
::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* mutable_generated_code_info();
|
||||
void set_allocated_generated_code_info(::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* generated_code_info);
|
||||
private:
|
||||
const PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo& _internal_generated_code_info() const;
|
||||
PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* _internal_mutable_generated_code_info();
|
||||
const ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo& _internal_generated_code_info() const;
|
||||
::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* _internal_mutable_generated_code_info();
|
||||
public:
|
||||
void unsafe_arena_set_allocated_generated_code_info(
|
||||
PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* generated_code_info);
|
||||
PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* unsafe_arena_release_generated_code_info();
|
||||
::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* generated_code_info);
|
||||
::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* unsafe_arena_release_generated_code_info();
|
||||
|
||||
// @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorResponse.File)
|
||||
private:
|
||||
@ -745,7 +757,7 @@ class PROTOC_EXPORT CodeGeneratorResponse_File final :
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr insertion_point_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr content_;
|
||||
PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* generated_code_info_;
|
||||
::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* generated_code_info_;
|
||||
friend struct ::TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto;
|
||||
};
|
||||
// -------------------------------------------------------------------
|
||||
@ -769,7 +781,11 @@ class PROTOC_EXPORT CodeGeneratorResponse final :
|
||||
}
|
||||
inline CodeGeneratorResponse& operator=(CodeGeneratorResponse&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
@ -914,16 +930,16 @@ class PROTOC_EXPORT CodeGeneratorResponse final :
|
||||
int _internal_file_size() const;
|
||||
public:
|
||||
void clear_file();
|
||||
PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* mutable_file(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >*
|
||||
::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* mutable_file(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >*
|
||||
mutable_file();
|
||||
private:
|
||||
const PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File& _internal_file(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* _internal_add_file();
|
||||
const ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File& _internal_file(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* _internal_add_file();
|
||||
public:
|
||||
const PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File& file(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* add_file();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >&
|
||||
const ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File& file(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* add_file();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >&
|
||||
file() const;
|
||||
|
||||
// optional string error = 1;
|
||||
@ -966,7 +982,7 @@ class PROTOC_EXPORT CodeGeneratorResponse final :
|
||||
typedef void DestructorSkippable_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File > file_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File > file_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr error_;
|
||||
::PROTOBUF_NAMESPACE_ID::uint64 supported_features_;
|
||||
friend struct ::TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto;
|
||||
@ -1268,31 +1284,31 @@ inline int CodeGeneratorRequest::_internal_proto_file_size() const {
|
||||
inline int CodeGeneratorRequest::proto_file_size() const {
|
||||
return _internal_proto_file_size();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::FileDescriptorProto* CodeGeneratorRequest::mutable_proto_file(int index) {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto* CodeGeneratorRequest::mutable_proto_file(int index) {
|
||||
// @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorRequest.proto_file)
|
||||
return proto_file_.Mutable(index);
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FileDescriptorProto >*
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto >*
|
||||
CodeGeneratorRequest::mutable_proto_file() {
|
||||
// @@protoc_insertion_point(field_mutable_list:google.protobuf.compiler.CodeGeneratorRequest.proto_file)
|
||||
return &proto_file_;
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::FileDescriptorProto& CodeGeneratorRequest::_internal_proto_file(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto& CodeGeneratorRequest::_internal_proto_file(int index) const {
|
||||
return proto_file_.Get(index);
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::FileDescriptorProto& CodeGeneratorRequest::proto_file(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto& CodeGeneratorRequest::proto_file(int index) const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorRequest.proto_file)
|
||||
return _internal_proto_file(index);
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::FileDescriptorProto* CodeGeneratorRequest::_internal_add_proto_file() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto* CodeGeneratorRequest::_internal_add_proto_file() {
|
||||
return proto_file_.Add();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::FileDescriptorProto* CodeGeneratorRequest::add_proto_file() {
|
||||
PROTOBUF_NAMESPACE_ID::FileDescriptorProto* _add = _internal_add_proto_file();
|
||||
inline ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto* CodeGeneratorRequest::add_proto_file() {
|
||||
::PROTOBUF_NAMESPACE_ID::FileDescriptorProto* _add = _internal_add_proto_file();
|
||||
// @@protoc_insertion_point(field_add:google.protobuf.compiler.CodeGeneratorRequest.proto_file)
|
||||
return _add;
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FileDescriptorProto >&
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto >&
|
||||
CodeGeneratorRequest::proto_file() const {
|
||||
// @@protoc_insertion_point(field_list:google.protobuf.compiler.CodeGeneratorRequest.proto_file)
|
||||
return proto_file_;
|
||||
@ -1311,17 +1327,17 @@ inline void CodeGeneratorRequest::clear_compiler_version() {
|
||||
if (compiler_version_ != nullptr) compiler_version_->Clear();
|
||||
_has_bits_[0] &= ~0x00000002u;
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::compiler::Version& CodeGeneratorRequest::_internal_compiler_version() const {
|
||||
const PROTOBUF_NAMESPACE_ID::compiler::Version* p = compiler_version_;
|
||||
return p != nullptr ? *p : reinterpret_cast<const PROTOBUF_NAMESPACE_ID::compiler::Version&>(
|
||||
PROTOBUF_NAMESPACE_ID::compiler::_Version_default_instance_);
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::compiler::Version& CodeGeneratorRequest::_internal_compiler_version() const {
|
||||
const ::PROTOBUF_NAMESPACE_ID::compiler::Version* p = compiler_version_;
|
||||
return p != nullptr ? *p : reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::compiler::Version&>(
|
||||
::PROTOBUF_NAMESPACE_ID::compiler::_Version_default_instance_);
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::compiler::Version& CodeGeneratorRequest::compiler_version() const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::compiler::Version& CodeGeneratorRequest::compiler_version() const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorRequest.compiler_version)
|
||||
return _internal_compiler_version();
|
||||
}
|
||||
inline void CodeGeneratorRequest::unsafe_arena_set_allocated_compiler_version(
|
||||
PROTOBUF_NAMESPACE_ID::compiler::Version* compiler_version) {
|
||||
::PROTOBUF_NAMESPACE_ID::compiler::Version* compiler_version) {
|
||||
if (GetArenaForAllocation() == nullptr) {
|
||||
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(compiler_version_);
|
||||
}
|
||||
@ -1333,9 +1349,9 @@ inline void CodeGeneratorRequest::unsafe_arena_set_allocated_compiler_version(
|
||||
}
|
||||
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.compiler.CodeGeneratorRequest.compiler_version)
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::compiler::Version* CodeGeneratorRequest::release_compiler_version() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::compiler::Version* CodeGeneratorRequest::release_compiler_version() {
|
||||
_has_bits_[0] &= ~0x00000002u;
|
||||
PROTOBUF_NAMESPACE_ID::compiler::Version* temp = compiler_version_;
|
||||
::PROTOBUF_NAMESPACE_ID::compiler::Version* temp = compiler_version_;
|
||||
compiler_version_ = nullptr;
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
|
||||
@ -1348,34 +1364,34 @@ inline PROTOBUF_NAMESPACE_ID::compiler::Version* CodeGeneratorRequest::release_c
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||
return temp;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::compiler::Version* CodeGeneratorRequest::unsafe_arena_release_compiler_version() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::compiler::Version* CodeGeneratorRequest::unsafe_arena_release_compiler_version() {
|
||||
// @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorRequest.compiler_version)
|
||||
_has_bits_[0] &= ~0x00000002u;
|
||||
PROTOBUF_NAMESPACE_ID::compiler::Version* temp = compiler_version_;
|
||||
::PROTOBUF_NAMESPACE_ID::compiler::Version* temp = compiler_version_;
|
||||
compiler_version_ = nullptr;
|
||||
return temp;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::compiler::Version* CodeGeneratorRequest::_internal_mutable_compiler_version() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::compiler::Version* CodeGeneratorRequest::_internal_mutable_compiler_version() {
|
||||
_has_bits_[0] |= 0x00000002u;
|
||||
if (compiler_version_ == nullptr) {
|
||||
auto* p = CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::compiler::Version>(GetArenaForAllocation());
|
||||
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::compiler::Version>(GetArenaForAllocation());
|
||||
compiler_version_ = p;
|
||||
}
|
||||
return compiler_version_;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::compiler::Version* CodeGeneratorRequest::mutable_compiler_version() {
|
||||
PROTOBUF_NAMESPACE_ID::compiler::Version* _msg = _internal_mutable_compiler_version();
|
||||
inline ::PROTOBUF_NAMESPACE_ID::compiler::Version* CodeGeneratorRequest::mutable_compiler_version() {
|
||||
::PROTOBUF_NAMESPACE_ID::compiler::Version* _msg = _internal_mutable_compiler_version();
|
||||
// @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorRequest.compiler_version)
|
||||
return _msg;
|
||||
}
|
||||
inline void CodeGeneratorRequest::set_allocated_compiler_version(PROTOBUF_NAMESPACE_ID::compiler::Version* compiler_version) {
|
||||
inline void CodeGeneratorRequest::set_allocated_compiler_version(::PROTOBUF_NAMESPACE_ID::compiler::Version* compiler_version) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
||||
if (message_arena == nullptr) {
|
||||
delete compiler_version_;
|
||||
}
|
||||
if (compiler_version) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
|
||||
::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<PROTOBUF_NAMESPACE_ID::compiler::Version>::GetOwningArena(compiler_version);
|
||||
::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::PROTOBUF_NAMESPACE_ID::compiler::Version>::GetOwningArena(compiler_version);
|
||||
if (message_arena != submessage_arena) {
|
||||
compiler_version = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
|
||||
message_arena, compiler_version, submessage_arena);
|
||||
@ -1575,17 +1591,17 @@ inline bool CodeGeneratorResponse_File::_internal_has_generated_code_info() cons
|
||||
inline bool CodeGeneratorResponse_File::has_generated_code_info() const {
|
||||
return _internal_has_generated_code_info();
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo& CodeGeneratorResponse_File::_internal_generated_code_info() const {
|
||||
const PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* p = generated_code_info_;
|
||||
return p != nullptr ? *p : reinterpret_cast<const PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo&>(
|
||||
PROTOBUF_NAMESPACE_ID::_GeneratedCodeInfo_default_instance_);
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo& CodeGeneratorResponse_File::_internal_generated_code_info() const {
|
||||
const ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* p = generated_code_info_;
|
||||
return p != nullptr ? *p : reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo&>(
|
||||
::PROTOBUF_NAMESPACE_ID::_GeneratedCodeInfo_default_instance_);
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo& CodeGeneratorResponse_File::generated_code_info() const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo& CodeGeneratorResponse_File::generated_code_info() const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.File.generated_code_info)
|
||||
return _internal_generated_code_info();
|
||||
}
|
||||
inline void CodeGeneratorResponse_File::unsafe_arena_set_allocated_generated_code_info(
|
||||
PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* generated_code_info) {
|
||||
::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* generated_code_info) {
|
||||
if (GetArenaForAllocation() == nullptr) {
|
||||
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(generated_code_info_);
|
||||
}
|
||||
@ -1597,9 +1613,9 @@ inline void CodeGeneratorResponse_File::unsafe_arena_set_allocated_generated_cod
|
||||
}
|
||||
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.generated_code_info)
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* CodeGeneratorResponse_File::release_generated_code_info() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* CodeGeneratorResponse_File::release_generated_code_info() {
|
||||
_has_bits_[0] &= ~0x00000008u;
|
||||
PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* temp = generated_code_info_;
|
||||
::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* temp = generated_code_info_;
|
||||
generated_code_info_ = nullptr;
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
|
||||
@ -1612,27 +1628,27 @@ inline PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* CodeGeneratorResponse_File::rel
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||
return temp;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* CodeGeneratorResponse_File::unsafe_arena_release_generated_code_info() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* CodeGeneratorResponse_File::unsafe_arena_release_generated_code_info() {
|
||||
// @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.generated_code_info)
|
||||
_has_bits_[0] &= ~0x00000008u;
|
||||
PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* temp = generated_code_info_;
|
||||
::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* temp = generated_code_info_;
|
||||
generated_code_info_ = nullptr;
|
||||
return temp;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* CodeGeneratorResponse_File::_internal_mutable_generated_code_info() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* CodeGeneratorResponse_File::_internal_mutable_generated_code_info() {
|
||||
_has_bits_[0] |= 0x00000008u;
|
||||
if (generated_code_info_ == nullptr) {
|
||||
auto* p = CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo>(GetArenaForAllocation());
|
||||
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo>(GetArenaForAllocation());
|
||||
generated_code_info_ = p;
|
||||
}
|
||||
return generated_code_info_;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* CodeGeneratorResponse_File::mutable_generated_code_info() {
|
||||
PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* _msg = _internal_mutable_generated_code_info();
|
||||
inline ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* CodeGeneratorResponse_File::mutable_generated_code_info() {
|
||||
::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* _msg = _internal_mutable_generated_code_info();
|
||||
// @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.File.generated_code_info)
|
||||
return _msg;
|
||||
}
|
||||
inline void CodeGeneratorResponse_File::set_allocated_generated_code_info(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* generated_code_info) {
|
||||
inline void CodeGeneratorResponse_File::set_allocated_generated_code_info(::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* generated_code_info) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(generated_code_info_);
|
||||
@ -1754,31 +1770,31 @@ inline int CodeGeneratorResponse::file_size() const {
|
||||
inline void CodeGeneratorResponse::clear_file() {
|
||||
file_.Clear();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* CodeGeneratorResponse::mutable_file(int index) {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* CodeGeneratorResponse::mutable_file(int index) {
|
||||
// @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.file)
|
||||
return file_.Mutable(index);
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >*
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >*
|
||||
CodeGeneratorResponse::mutable_file() {
|
||||
// @@protoc_insertion_point(field_mutable_list:google.protobuf.compiler.CodeGeneratorResponse.file)
|
||||
return &file_;
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File& CodeGeneratorResponse::_internal_file(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File& CodeGeneratorResponse::_internal_file(int index) const {
|
||||
return file_.Get(index);
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File& CodeGeneratorResponse::file(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File& CodeGeneratorResponse::file(int index) const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.file)
|
||||
return _internal_file(index);
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* CodeGeneratorResponse::_internal_add_file() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* CodeGeneratorResponse::_internal_add_file() {
|
||||
return file_.Add();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* CodeGeneratorResponse::add_file() {
|
||||
PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* _add = _internal_add_file();
|
||||
inline ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* CodeGeneratorResponse::add_file() {
|
||||
::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* _add = _internal_add_file();
|
||||
// @@protoc_insertion_point(field_add:google.protobuf.compiler.CodeGeneratorResponse.file)
|
||||
return _add;
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >&
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >&
|
||||
CodeGeneratorResponse::file() const {
|
||||
// @@protoc_insertion_point(field_list:google.protobuf.compiler.CodeGeneratorResponse.file)
|
||||
return file_;
|
||||
@ -1801,10 +1817,10 @@ PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
|
||||
template <> struct is_proto_enum< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_Feature> : ::std::true_type {};
|
||||
template <> struct is_proto_enum< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_Feature> : ::std::true_type {};
|
||||
template <>
|
||||
inline const EnumDescriptor* GetEnumDescriptor< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_Feature>() {
|
||||
return PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_Feature_descriptor();
|
||||
inline const EnumDescriptor* GetEnumDescriptor< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_Feature>() {
|
||||
return ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_Feature_descriptor();
|
||||
}
|
||||
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
@ -1010,7 +1010,7 @@ class TableArena {
|
||||
}
|
||||
|
||||
Block* current_ = nullptr;
|
||||
std::array<Block*, kSmallSizes.size()> small_size_blocks_{};
|
||||
std::array<Block*, kSmallSizes.size()> small_size_blocks_ = {{}};
|
||||
Block* full_blocks_ = nullptr;
|
||||
|
||||
size_t num_allocations_ = 0;
|
||||
@ -2465,7 +2465,7 @@ bool DescriptorPool::TryFindExtensionInFallbackDatabase(
|
||||
// ===================================================================
|
||||
|
||||
bool FieldDescriptor::is_map_message_type() const {
|
||||
return message_type_->options().map_entry();
|
||||
return type_descriptor_.message_type->options().map_entry();
|
||||
}
|
||||
|
||||
std::string FieldDescriptor::DefaultValueAsString(
|
||||
@ -5249,6 +5249,7 @@ void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto,
|
||||
result->file_ = file_;
|
||||
result->number_ = proto.number();
|
||||
result->is_extension_ = is_extension;
|
||||
result->is_oneof_ = false;
|
||||
result->proto3_optional_ = proto.proto3_optional();
|
||||
|
||||
if (proto.proto3_optional() &&
|
||||
@ -5284,9 +5285,6 @@ void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto,
|
||||
|
||||
// Some of these may be filled in when cross-linking.
|
||||
result->containing_type_ = nullptr;
|
||||
result->extension_scope_ = nullptr;
|
||||
result->message_type_ = nullptr;
|
||||
result->enum_type_ = nullptr;
|
||||
result->type_once_ = nullptr;
|
||||
result->default_value_enum_ = nullptr;
|
||||
|
||||
@ -5461,16 +5459,13 @@ void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto,
|
||||
"FieldDescriptorProto.extendee not set for extension field.");
|
||||
}
|
||||
|
||||
result->extension_scope_ = parent;
|
||||
result->scope_.extension_scope = parent;
|
||||
|
||||
if (proto.has_oneof_index()) {
|
||||
AddError(result->full_name(), proto, DescriptorPool::ErrorCollector::TYPE,
|
||||
"FieldDescriptorProto.oneof_index should not be set for "
|
||||
"extensions.");
|
||||
}
|
||||
|
||||
// Fill in later (maybe).
|
||||
result->containing_oneof_ = nullptr;
|
||||
} else {
|
||||
if (proto.has_extendee()) {
|
||||
AddError(result->full_name(), proto,
|
||||
@ -5488,12 +5483,11 @@ void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto,
|
||||
strings::Substitute("FieldDescriptorProto.oneof_index $0 is "
|
||||
"out of range for type \"$1\".",
|
||||
proto.oneof_index(), parent->name()));
|
||||
result->containing_oneof_ = nullptr;
|
||||
} else {
|
||||
result->containing_oneof_ = parent->oneof_decl(proto.oneof_index());
|
||||
result->is_oneof_ = true;
|
||||
result->scope_.containing_oneof =
|
||||
parent->oneof_decl(proto.oneof_index());
|
||||
}
|
||||
} else {
|
||||
result->containing_oneof_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -6159,8 +6153,8 @@ void DescriptorBuilder::CrossLinkField(FieldDescriptor* field,
|
||||
}
|
||||
|
||||
if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
|
||||
field->message_type_ = type.descriptor();
|
||||
if (field->message_type_ == nullptr) {
|
||||
field->type_descriptor_.message_type = type.descriptor();
|
||||
if (field->type_descriptor_.message_type == nullptr) {
|
||||
AddError(field->full_name(), proto,
|
||||
DescriptorPool::ErrorCollector::TYPE,
|
||||
"\"" + proto.type_name() + "\" is not a message type.");
|
||||
@ -6173,8 +6167,8 @@ void DescriptorBuilder::CrossLinkField(FieldDescriptor* field,
|
||||
"Messages can't have default values.");
|
||||
}
|
||||
} else if (field->cpp_type() == FieldDescriptor::CPPTYPE_ENUM) {
|
||||
field->enum_type_ = type.enum_descriptor();
|
||||
if (field->enum_type_ == nullptr) {
|
||||
field->type_descriptor_.enum_type = type.enum_descriptor();
|
||||
if (field->type_descriptor_.enum_type == nullptr) {
|
||||
AddError(field->full_name(), proto,
|
||||
DescriptorPool::ErrorCollector::TYPE,
|
||||
"\"" + proto.type_name() + "\" is not an enum type.");
|
||||
@ -7772,22 +7766,23 @@ Symbol DescriptorPool::CrossLinkOnDemandHelper(StringPiece name,
|
||||
// enum_type_, message_type_, and default_value_enum_ appropriately.
|
||||
void FieldDescriptor::InternalTypeOnceInit() const {
|
||||
GOOGLE_CHECK(file()->finished_building_ == true);
|
||||
const EnumDescriptor* enum_type = nullptr;
|
||||
if (type_once_->field.type_name) {
|
||||
Symbol result = file()->pool()->CrossLinkOnDemandHelper(
|
||||
*type_once_->field.type_name, type_ == FieldDescriptor::TYPE_ENUM);
|
||||
if (result.type() == Symbol::MESSAGE) {
|
||||
type_ = FieldDescriptor::TYPE_MESSAGE;
|
||||
message_type_ = result.descriptor();
|
||||
type_descriptor_.message_type = result.descriptor();
|
||||
} else if (result.type() == Symbol::ENUM) {
|
||||
type_ = FieldDescriptor::TYPE_ENUM;
|
||||
enum_type_ = result.enum_descriptor();
|
||||
enum_type = type_descriptor_.enum_type = result.enum_descriptor();
|
||||
}
|
||||
}
|
||||
if (enum_type_ && !default_value_enum_) {
|
||||
if (enum_type && !default_value_enum_) {
|
||||
if (type_once_->field.default_value_enum_name) {
|
||||
// Have to build the full name now instead of at CrossLink time,
|
||||
// because enum_type_ may not be known at the time.
|
||||
std::string name = enum_type_->full_name();
|
||||
// because enum_type may not be known at the time.
|
||||
std::string name = enum_type->full_name();
|
||||
// Enum values reside in the same scope as the enum type.
|
||||
std::string::size_type last_dot = name.find_last_of('.');
|
||||
if (last_dot != std::string::npos) {
|
||||
@ -7802,8 +7797,8 @@ void FieldDescriptor::InternalTypeOnceInit() const {
|
||||
if (!default_value_enum_) {
|
||||
// We use the first defined value as the default
|
||||
// if a default is not explicitly defined.
|
||||
GOOGLE_CHECK(enum_type_->value_count());
|
||||
default_value_enum_ = enum_type_->value(0);
|
||||
GOOGLE_CHECK(enum_type->value_count());
|
||||
default_value_enum_ = enum_type->value(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -7819,14 +7814,16 @@ const Descriptor* FieldDescriptor::message_type() const {
|
||||
if (type_once_) {
|
||||
internal::call_once(type_once_->once, FieldDescriptor::TypeOnceInit, this);
|
||||
}
|
||||
return message_type_;
|
||||
return type_ == TYPE_MESSAGE || type_ == TYPE_GROUP
|
||||
? type_descriptor_.message_type
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
const EnumDescriptor* FieldDescriptor::enum_type() const {
|
||||
if (type_once_) {
|
||||
internal::call_once(type_once_->once, FieldDescriptor::TypeOnceInit, this);
|
||||
}
|
||||
return enum_type_;
|
||||
return type_ == TYPE_ENUM ? type_descriptor_.enum_type : nullptr;
|
||||
}
|
||||
|
||||
const EnumValueDescriptor* FieldDescriptor::default_value_enum() const {
|
||||
|
@ -62,6 +62,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include <google/protobuf/stubs/common.h>
|
||||
#include <google/protobuf/stubs/logging.h>
|
||||
#include <google/protobuf/stubs/mutex.h>
|
||||
#include <google/protobuf/stubs/once.h>
|
||||
#include <google/protobuf/port.h>
|
||||
@ -916,6 +917,8 @@ class PROTOBUF_EXPORT FieldDescriptor : private internal::SymbolBase {
|
||||
// Actually a `Label` but stored as uint8_t to save space.
|
||||
uint8_t label_;
|
||||
|
||||
bool is_oneof_ : 1;
|
||||
|
||||
// Logically:
|
||||
// all_names_ = [name, full_name, lower, camel, json]
|
||||
// However:
|
||||
@ -935,10 +938,14 @@ class PROTOBUF_EXPORT FieldDescriptor : private internal::SymbolBase {
|
||||
int number_;
|
||||
int index_in_oneof_;
|
||||
const Descriptor* containing_type_;
|
||||
const OneofDescriptor* containing_oneof_;
|
||||
const Descriptor* extension_scope_;
|
||||
mutable const Descriptor* message_type_;
|
||||
mutable const EnumDescriptor* enum_type_;
|
||||
union {
|
||||
const OneofDescriptor* containing_oneof;
|
||||
const Descriptor* extension_scope;
|
||||
} scope_;
|
||||
union {
|
||||
mutable const Descriptor* message_type;
|
||||
mutable const EnumDescriptor* enum_type;
|
||||
} type_descriptor_;
|
||||
const FieldOptions* options_;
|
||||
// IMPORTANT: If you add a new field, make sure to search for all instances
|
||||
// of Allocate<FieldDescriptor>() and AllocateArray<FieldDescriptor>() in
|
||||
@ -2089,10 +2096,7 @@ PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, file, const FileDescriptor*)
|
||||
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, number, int)
|
||||
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, is_extension, bool)
|
||||
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, containing_type, const Descriptor*)
|
||||
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, containing_oneof,
|
||||
const OneofDescriptor*)
|
||||
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, index_in_oneof, int)
|
||||
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, extension_scope, const Descriptor*)
|
||||
PROTOBUF_DEFINE_OPTIONS_ACCESSOR(FieldDescriptor, FieldOptions)
|
||||
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, has_default_value, bool)
|
||||
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, has_json_name, bool)
|
||||
@ -2225,6 +2229,15 @@ inline const std::string& FieldDescriptor::json_name() const {
|
||||
return all_names_[json_name_index_];
|
||||
}
|
||||
|
||||
inline const OneofDescriptor* FieldDescriptor::containing_oneof() const {
|
||||
return is_oneof_ ? scope_.containing_oneof : nullptr;
|
||||
}
|
||||
|
||||
inline const Descriptor* FieldDescriptor::extension_scope() const {
|
||||
GOOGLE_CHECK(is_extension_);
|
||||
return scope_.extension_scope;
|
||||
}
|
||||
|
||||
inline FieldDescriptor::Label FieldDescriptor::label() const {
|
||||
return static_cast<Label>(label_);
|
||||
}
|
||||
@ -2263,9 +2276,8 @@ inline bool FieldDescriptor::has_optional_keyword() const {
|
||||
}
|
||||
|
||||
inline const OneofDescriptor* FieldDescriptor::real_containing_oneof() const {
|
||||
return containing_oneof_ && !containing_oneof_->is_synthetic()
|
||||
? containing_oneof_
|
||||
: nullptr;
|
||||
auto* oneof = containing_oneof();
|
||||
return oneof && !oneof->is_synthetic() ? oneof : nullptr;
|
||||
}
|
||||
|
||||
inline bool FieldDescriptor::has_presence() const {
|
||||
@ -2279,8 +2291,8 @@ inline bool FieldDescriptor::has_presence() const {
|
||||
inline int FieldDescriptor::index() const {
|
||||
if (!is_extension_) {
|
||||
return static_cast<int>(this - containing_type()->fields_);
|
||||
} else if (extension_scope_ != nullptr) {
|
||||
return static_cast<int>(this - extension_scope_->extensions_);
|
||||
} else if (extension_scope() != nullptr) {
|
||||
return static_cast<int>(this - extension_scope()->extensions_);
|
||||
} else {
|
||||
return static_cast<int>(this - file_->extensions_);
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -37,20 +37,20 @@ static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_s
|
||||
|
||||
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fduration_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Duration, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Duration, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Duration, seconds_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Duration, nanos_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Duration, seconds_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Duration, nanos_),
|
||||
};
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
{ 0, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::Duration)},
|
||||
{ 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Duration)},
|
||||
};
|
||||
|
||||
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Duration_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_Duration_default_instance_),
|
||||
};
|
||||
|
||||
const char descriptor_table_protodef_google_2fprotobuf_2fduration_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
||||
@ -291,8 +291,8 @@ void Duration::InternalSwap(Duration* other) {
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Duration* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Duration >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Duration >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Duration* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Duration >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Duration >(arena);
|
||||
}
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
|
@ -59,7 +59,7 @@ struct DurationDefaultTypeInternal;
|
||||
PROTOBUF_EXPORT extern DurationDefaultTypeInternal _Duration_default_instance_;
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Duration* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Duration>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::Duration* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Duration>(Arena*);
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
|
||||
@ -84,7 +84,11 @@ class PROTOBUF_EXPORT Duration final :
|
||||
}
|
||||
inline Duration& operator=(Duration&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
|
@ -35,18 +35,18 @@ static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_s
|
||||
|
||||
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fempty_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Empty, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Empty, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
};
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
{ 0, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::Empty)},
|
||||
{ 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Empty)},
|
||||
};
|
||||
|
||||
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Empty_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_Empty_default_instance_),
|
||||
};
|
||||
|
||||
const char descriptor_table_protodef_google_2fprotobuf_2fempty_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
||||
@ -113,8 +113,8 @@ const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Empty::GetClassData() const {
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Empty* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Empty >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Empty >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Empty* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Empty >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Empty >(arena);
|
||||
}
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <google/protobuf/io/coded_stream.h>
|
||||
#include <google/protobuf/arena.h>
|
||||
#include <google/protobuf/arenastring.h>
|
||||
#include <google/protobuf/generated_message_bases.h>
|
||||
#include <google/protobuf/generated_message_table_driven.h>
|
||||
#include <google/protobuf/generated_message_util.h>
|
||||
#include <google/protobuf/metadata_lite.h>
|
||||
@ -59,7 +60,7 @@ struct EmptyDefaultTypeInternal;
|
||||
PROTOBUF_EXPORT extern EmptyDefaultTypeInternal _Empty_default_instance_;
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Empty* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Empty>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::Empty* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Empty>(Arena*);
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
|
||||
@ -83,7 +84,11 @@ class PROTOBUF_EXPORT Empty final :
|
||||
}
|
||||
inline Empty& operator=(Empty&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
|
@ -43,14 +43,16 @@
|
||||
#include <google/protobuf/parse_context.h>
|
||||
#include <google/protobuf/io/coded_stream.h>
|
||||
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
|
||||
#include <google/protobuf/arena.h>
|
||||
#include <google/protobuf/message_lite.h>
|
||||
#include <google/protobuf/metadata_lite.h>
|
||||
#include <google/protobuf/repeated_field.h>
|
||||
#include <google/protobuf/stubs/map_util.h>
|
||||
#include <google/protobuf/stubs/hash.h>
|
||||
|
||||
#include <google/protobuf/port_def.inc>
|
||||
|
||||
// clang-format off
|
||||
#include <google/protobuf/port_def.inc> // must be last.
|
||||
// clang-format on
|
||||
namespace google {
|
||||
namespace protobuf {
|
||||
namespace internal {
|
||||
@ -649,7 +651,7 @@ MessageLite* ExtensionSet::MutableMessage(int number, FieldType type,
|
||||
GOOGLE_DCHECK_TYPE(*extension, OPTIONAL_FIELD, MESSAGE);
|
||||
extension->is_cleared = false;
|
||||
if (extension->is_lazy) {
|
||||
return extension->lazymessage_value->MutableMessage(prototype);
|
||||
return extension->lazymessage_value->MutableMessage(prototype, arena_);
|
||||
} else {
|
||||
return extension->message_value;
|
||||
}
|
||||
@ -1075,7 +1077,15 @@ void ExtensionSet::InternalExtensionMergeFrom(
|
||||
extension->lazymessage_value =
|
||||
other_extension.lazymessage_value->New(arena_);
|
||||
extension->lazymessage_value->MergeFrom(
|
||||
*other_extension.lazymessage_value);
|
||||
*other_extension.lazymessage_value, arena_);
|
||||
} else if (&MaybeCreateLazyExtension != nullptr &&
|
||||
(extension->lazymessage_value =
|
||||
MaybeCreateLazyExtension(arena_)) != nullptr) {
|
||||
// Binary has opted into lazy-after-merge; the destination of the
|
||||
// merge is now a LazyField.
|
||||
extension->lazymessage_value->MergeFromMessage(
|
||||
*other_extension.message_value, arena_);
|
||||
extension->is_lazy = true;
|
||||
} else {
|
||||
extension->is_lazy = false;
|
||||
extension->message_value =
|
||||
@ -1090,7 +1100,7 @@ void ExtensionSet::InternalExtensionMergeFrom(
|
||||
if (other_extension.is_lazy) {
|
||||
if (extension->is_lazy) {
|
||||
extension->lazymessage_value->MergeFrom(
|
||||
*other_extension.lazymessage_value);
|
||||
*other_extension.lazymessage_value, arena_);
|
||||
} else {
|
||||
extension->message_value->CheckTypeAndMergeFrom(
|
||||
other_extension.lazymessage_value->GetMessage(
|
||||
@ -1099,7 +1109,7 @@ void ExtensionSet::InternalExtensionMergeFrom(
|
||||
} else {
|
||||
if (extension->is_lazy) {
|
||||
extension->lazymessage_value
|
||||
->MutableMessage(*other_extension.message_value)
|
||||
->MutableMessage(*other_extension.message_value, arena_)
|
||||
->CheckTypeAndMergeFrom(*other_extension.message_value);
|
||||
} else {
|
||||
extension->message_value->CheckTypeAndMergeFrom(
|
||||
@ -2225,6 +2235,13 @@ size_t ExtensionSet::MessageSetByteSize() const {
|
||||
return total_size;
|
||||
}
|
||||
|
||||
#if !PROTOBUF_HAVE_ATTRIBUTE_WEAK
|
||||
// If weak attributes are not supported define the default behavior.
|
||||
ExtensionSet::LazyMessageExtension* MaybeCreateLazyExtension(Arena* arena) {
|
||||
return nullptr;
|
||||
}
|
||||
#endif // PROTOBUF_HAVE_ATTRIBUTE_WEAK
|
||||
|
||||
} // namespace internal
|
||||
} // namespace protobuf
|
||||
} // namespace google
|
||||
|
@ -53,7 +53,9 @@
|
||||
#include <google/protobuf/repeated_field.h>
|
||||
#include <google/protobuf/wire_format_lite.h>
|
||||
|
||||
#include <google/protobuf/port_def.inc>
|
||||
// clang-format off
|
||||
#include <google/protobuf/port_def.inc> // Must be last
|
||||
// clang-format on
|
||||
|
||||
#ifdef SWIG
|
||||
#error "You cannot SWIG proto headers"
|
||||
@ -573,7 +575,8 @@ class PROTOBUF_EXPORT ExtensionSet {
|
||||
virtual LazyMessageExtension* New(Arena* arena) const = 0;
|
||||
virtual const MessageLite& GetMessage(
|
||||
const MessageLite& prototype) const = 0;
|
||||
virtual MessageLite* MutableMessage(const MessageLite& prototype) = 0;
|
||||
virtual MessageLite* MutableMessage(const MessageLite& prototype,
|
||||
Arena* arena) = 0;
|
||||
virtual void SetAllocatedMessage(MessageLite* message) = 0;
|
||||
virtual void UnsafeArenaSetAllocatedMessage(MessageLite* message) = 0;
|
||||
virtual PROTOBUF_MUST_USE_RESULT MessageLite* ReleaseMessage(
|
||||
@ -588,7 +591,8 @@ class PROTOBUF_EXPORT ExtensionSet {
|
||||
virtual size_t ByteSizeLong() const = 0;
|
||||
virtual size_t SpaceUsedLong() const = 0;
|
||||
|
||||
virtual void MergeFrom(const LazyMessageExtension& other) = 0;
|
||||
virtual void MergeFrom(const LazyMessageExtension& other, Arena* arena) = 0;
|
||||
virtual void MergeFromMessage(const MessageLite& msg, Arena* arena) = 0;
|
||||
virtual void Clear() = 0;
|
||||
|
||||
virtual bool ReadMessage(const MessageLite& prototype,
|
||||
@ -603,6 +607,8 @@ class PROTOBUF_EXPORT ExtensionSet {
|
||||
|
||||
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(LazyMessageExtension);
|
||||
};
|
||||
// Give access to function defined below to see LazyMessageExtension.
|
||||
friend LazyMessageExtension* MaybeCreateLazyExtension(Arena* arena);
|
||||
struct Extension {
|
||||
// The order of these fields packs Extension into 24 bytes when using 8
|
||||
// byte alignment. Consider this when adding or removing fields here.
|
||||
@ -1497,6 +1503,11 @@ class ExtensionIdentifier {
|
||||
// -------------------------------------------------------------------
|
||||
// Generated accessors
|
||||
|
||||
|
||||
// Used to retrieve a lazy extension, may return nullptr in some environments.
|
||||
extern PROTOBUF_ATTRIBUTE_WEAK ExtensionSet::LazyMessageExtension*
|
||||
MaybeCreateLazyExtension(Arena* arena);
|
||||
|
||||
} // namespace internal
|
||||
|
||||
// Call this function to ensure that this extensions's reflection is linked into
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include <google/protobuf/extension_set_inl.h>
|
||||
#include <google/protobuf/parse_context.h>
|
||||
#include <google/protobuf/io/coded_stream.h>
|
||||
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
|
||||
#include <google/protobuf/arena.h>
|
||||
#include <google/protobuf/descriptor.h>
|
||||
#include <google/protobuf/extension_set.h>
|
||||
#include <google/protobuf/message.h>
|
||||
@ -183,7 +183,7 @@ MessageLite* ExtensionSet::MutableMessage(const FieldDescriptor* descriptor,
|
||||
extension->is_cleared = false;
|
||||
if (extension->is_lazy) {
|
||||
return extension->lazymessage_value->MutableMessage(
|
||||
*factory->GetPrototype(descriptor->message_type()));
|
||||
*factory->GetPrototype(descriptor->message_type()), arena_);
|
||||
} else {
|
||||
return extension->message_value;
|
||||
}
|
||||
|
@ -34,6 +34,8 @@
|
||||
|
||||
#include <google/protobuf/stubs/casts.h>
|
||||
#include <google/protobuf/stubs/strutil.h>
|
||||
#include <google/protobuf/stubs/logging.h>
|
||||
#include <google/protobuf/stubs/common.h>
|
||||
#include <google/protobuf/test_util.h>
|
||||
#include <google/protobuf/test_util2.h>
|
||||
#include <google/protobuf/unittest.pb.h>
|
||||
@ -46,8 +48,6 @@
|
||||
#include <google/protobuf/dynamic_message.h>
|
||||
#include <google/protobuf/extension_set.h>
|
||||
#include <google/protobuf/wire_format.h>
|
||||
#include <google/protobuf/stubs/logging.h>
|
||||
#include <google/protobuf/stubs/common.h>
|
||||
#include <google/protobuf/testing/googletest.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <google/protobuf/stubs/stl_util.h>
|
||||
|
@ -1,31 +0,0 @@
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
// https://developers.google.com/protocol-buffers/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <google/protobuf/field_access_listener.h>
|
@ -36,19 +36,19 @@ static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_s
|
||||
|
||||
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldMask, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldMask, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldMask, paths_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldMask, paths_),
|
||||
};
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
{ 0, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::FieldMask)},
|
||||
{ 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::FieldMask)},
|
||||
};
|
||||
|
||||
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_FieldMask_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_FieldMask_default_instance_),
|
||||
};
|
||||
|
||||
const char descriptor_table_protodef_google_2fprotobuf_2ffield_5fmask_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
||||
@ -267,8 +267,8 @@ void FieldMask::InternalSwap(FieldMask* other) {
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::FieldMask* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::FieldMask >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::FieldMask >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::FieldMask* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::FieldMask >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::FieldMask >(arena);
|
||||
}
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
|
@ -59,7 +59,7 @@ struct FieldMaskDefaultTypeInternal;
|
||||
PROTOBUF_EXPORT extern FieldMaskDefaultTypeInternal _FieldMask_default_instance_;
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::FieldMask* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::FieldMask>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::FieldMask* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::FieldMask>(Arena*);
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
|
||||
@ -84,7 +84,11 @@ class PROTOBUF_EXPORT FieldMask final :
|
||||
}
|
||||
inline FieldMask& operator=(FieldMask&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
|
125
src/google/protobuf/generated_message_bases.cc
Normal file
125
src/google/protobuf/generated_message_bases.cc
Normal file
@ -0,0 +1,125 @@
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
// https://developers.google.com/protocol-buffers/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <google/protobuf/generated_message_bases.h>
|
||||
|
||||
#include <google/protobuf/parse_context.h>
|
||||
#include <google/protobuf/io/coded_stream.h>
|
||||
#include <google/protobuf/io/zero_copy_stream_impl.h>
|
||||
#include <google/protobuf/unknown_field_set.h>
|
||||
#include <google/protobuf/wire_format.h>
|
||||
#include <google/protobuf/wire_format_lite.h>
|
||||
|
||||
// Must be last:
|
||||
#include <google/protobuf/port_def.inc>
|
||||
|
||||
namespace google {
|
||||
namespace protobuf {
|
||||
namespace internal {
|
||||
|
||||
// =============================================================================
|
||||
// ZeroFieldsBase
|
||||
|
||||
void ZeroFieldsBase::Clear() {
|
||||
_internal_metadata_.Clear<UnknownFieldSet>(); //
|
||||
}
|
||||
|
||||
ZeroFieldsBase::~ZeroFieldsBase() {
|
||||
if (GetArenaForAllocation() != nullptr) return;
|
||||
_internal_metadata_.Delete<UnknownFieldSet>();
|
||||
}
|
||||
|
||||
size_t ZeroFieldsBase::ByteSizeLong() const {
|
||||
return MaybeComputeUnknownFieldsSize(0, &_cached_size_);
|
||||
}
|
||||
|
||||
const char* ZeroFieldsBase::_InternalParse(const char* ptr,
|
||||
internal::ParseContext* ctx) {
|
||||
#define CHK_(x) \
|
||||
if (PROTOBUF_PREDICT_FALSE(!(x))) { \
|
||||
goto failure; \
|
||||
}
|
||||
|
||||
while (!ctx->Done(&ptr)) {
|
||||
uint32_t tag;
|
||||
ptr = internal::ReadTag(ptr, &tag);
|
||||
if ((tag == 0) || ((tag & 7) == 4)) {
|
||||
CHK_(ptr);
|
||||
ctx->SetLastTag(tag);
|
||||
goto message_done;
|
||||
}
|
||||
ptr = UnknownFieldParse(
|
||||
tag, _internal_metadata_.mutable_unknown_fields<UnknownFieldSet>(), ptr,
|
||||
ctx);
|
||||
CHK_(ptr);
|
||||
} // while
|
||||
message_done:
|
||||
return ptr;
|
||||
failure:
|
||||
ptr = nullptr;
|
||||
goto message_done;
|
||||
#undef CHK_
|
||||
}
|
||||
|
||||
::uint8_t* ZeroFieldsBase::_InternalSerialize(
|
||||
::uint8_t* target, io::EpsCopyOutputStream* stream) const {
|
||||
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||||
target = internal::WireFormat::InternalSerializeUnknownFieldsToArray(
|
||||
_internal_metadata_.unknown_fields<UnknownFieldSet>(
|
||||
UnknownFieldSet::default_instance),
|
||||
target, stream);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
void ZeroFieldsBase::MergeImpl(Message* to_param, const Message& from_param) {
|
||||
auto* to = static_cast<ZeroFieldsBase*>(to_param);
|
||||
const auto* from = static_cast<const ZeroFieldsBase*>(&from_param);
|
||||
GOOGLE_DCHECK_NE(from, to);
|
||||
to->_internal_metadata_.MergeFrom<UnknownFieldSet>(from->_internal_metadata_);
|
||||
}
|
||||
|
||||
void ZeroFieldsBase::CopyImpl(Message* to_param, const Message& from_param) {
|
||||
auto* to = static_cast<ZeroFieldsBase*>(to_param);
|
||||
const auto* from = static_cast<const ZeroFieldsBase*>(&from_param);
|
||||
if (from == to) return;
|
||||
to->_internal_metadata_.Clear<UnknownFieldSet>();
|
||||
to->_internal_metadata_.MergeFrom<UnknownFieldSet>(from->_internal_metadata_);
|
||||
}
|
||||
|
||||
void ZeroFieldsBase::InternalSwap(ZeroFieldsBase* other) {
|
||||
_internal_metadata_.Swap<UnknownFieldSet>(&other->_internal_metadata_);
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
} // namespace protobuf
|
||||
} // namespace google
|
||||
|
||||
#include <google/protobuf/port_undef.inc>
|
87
src/google/protobuf/generated_message_bases.h
Normal file
87
src/google/protobuf/generated_message_bases.h
Normal file
@ -0,0 +1,87 @@
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
// https://developers.google.com/protocol-buffers/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// This file contains helpers for generated code.
|
||||
//
|
||||
// Nothing in this file should be directly referenced by users of protobufs.
|
||||
|
||||
#ifndef GOOGLE_PROTOBUF_GENERATED_MESSAGE_BASES_H__
|
||||
#define GOOGLE_PROTOBUF_GENERATED_MESSAGE_BASES_H__
|
||||
|
||||
#include <google/protobuf/parse_context.h>
|
||||
#include <google/protobuf/io/zero_copy_stream_impl.h>
|
||||
#include <google/protobuf/arena.h>
|
||||
#include <google/protobuf/generated_message_util.h>
|
||||
#include <google/protobuf/message.h>
|
||||
|
||||
// Must come last:
|
||||
#include <google/protobuf/port_def.inc>
|
||||
|
||||
namespace google {
|
||||
namespace protobuf {
|
||||
namespace internal {
|
||||
|
||||
// To save code size, protos without any fields are derived from ZeroFieldsBase
|
||||
// rather than Message.
|
||||
class PROTOBUF_EXPORT ZeroFieldsBase : public Message {
|
||||
public:
|
||||
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
|
||||
bool IsInitialized() const final { return true; }
|
||||
size_t ByteSizeLong() const final;
|
||||
int GetCachedSize() const final { return _cached_size_.Get(); }
|
||||
const char* _InternalParse(const char* ptr,
|
||||
internal::ParseContext* ctx) final;
|
||||
::uint8_t* _InternalSerialize(::uint8_t* target,
|
||||
io::EpsCopyOutputStream* stream) const final;
|
||||
|
||||
protected:
|
||||
constexpr ZeroFieldsBase() {}
|
||||
explicit ZeroFieldsBase(Arena* arena, bool is_message_owned)
|
||||
: Message(arena, is_message_owned) {}
|
||||
ZeroFieldsBase(const ZeroFieldsBase&) = delete;
|
||||
ZeroFieldsBase& operator=(const ZeroFieldsBase&) = delete;
|
||||
~ZeroFieldsBase() override;
|
||||
|
||||
void SetCachedSize(int size) const final { _cached_size_.Set(size); }
|
||||
|
||||
static void MergeImpl(Message* to, const Message& from);
|
||||
static void CopyImpl(Message* to, const Message& from);
|
||||
void InternalSwap(ZeroFieldsBase* other);
|
||||
|
||||
mutable internal::CachedSize _cached_size_;
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
} // namespace protobuf
|
||||
} // namespace google
|
||||
|
||||
#include <google/protobuf/port_undef.inc>
|
||||
|
||||
#endif // GOOGLE_PROTOBUF_GENERATED_MESSAGE_BASES_H__
|
@ -955,48 +955,7 @@ void Reflection::Swap(Message* message1, Message* message2) const {
|
||||
|
||||
GOOGLE_DCHECK_EQ(message1->GetOwningArena(), message2->GetOwningArena());
|
||||
|
||||
// TODO(seongkim): use UnsafeArenaSwap() after some flight miles.
|
||||
for (int i = 0; i <= last_non_weak_field_index_; i++) {
|
||||
const FieldDescriptor* field = descriptor_->field(i);
|
||||
if (schema_.InRealOneof(field)) continue;
|
||||
if (schema_.IsFieldStripped(field)) continue;
|
||||
SwapField(message1, message2, field);
|
||||
}
|
||||
const int oneof_decl_count = descriptor_->oneof_decl_count();
|
||||
for (int i = 0; i < oneof_decl_count; i++) {
|
||||
const OneofDescriptor* oneof = descriptor_->oneof_decl(i);
|
||||
if (!oneof->is_synthetic()) {
|
||||
SwapOneofField<false>(message1, message2, oneof);
|
||||
}
|
||||
}
|
||||
|
||||
// Swapping bits need to happen after swapping fields, because the latter may
|
||||
// depend on the has bit information.
|
||||
if (schema_.HasHasbits()) {
|
||||
uint32_t* has_bits1 = MutableHasBits(message1);
|
||||
uint32_t* has_bits2 = MutableHasBits(message2);
|
||||
|
||||
int fields_with_has_bits = 0;
|
||||
for (int i = 0; i < descriptor_->field_count(); i++) {
|
||||
const FieldDescriptor* field = descriptor_->field(i);
|
||||
if (field->is_repeated() || schema_.InRealOneof(field)) {
|
||||
continue;
|
||||
}
|
||||
fields_with_has_bits++;
|
||||
}
|
||||
|
||||
int has_bits_size = (fields_with_has_bits + 31) / 32;
|
||||
|
||||
for (int i = 0; i < has_bits_size; i++) {
|
||||
std::swap(has_bits1[i], has_bits2[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (schema_.HasExtensionSet()) {
|
||||
MutableExtensionSet(message1)->Swap(MutableExtensionSet(message2));
|
||||
}
|
||||
|
||||
MutableUnknownFields(message1)->Swap(MutableUnknownFields(message2));
|
||||
UnsafeArenaSwap(message1, message2);
|
||||
}
|
||||
|
||||
template <bool unsafe_shallow_swap>
|
||||
|
@ -93,6 +93,19 @@ namespace internal {
|
||||
::google::protobuf::internal::TcParserBase::RepeatedParseMessage<MESSAGE, uint16_t>
|
||||
#endif // PROTOBUF_TC_STATIC_PARSE_REPEATED2
|
||||
|
||||
#ifndef NDEBUG
|
||||
template <size_t align>
|
||||
#ifndef _MSC_VER
|
||||
[[noreturn]]
|
||||
#endif
|
||||
void AlignFail(uintptr_t address) {
|
||||
GOOGLE_LOG(FATAL) << "Unaligned (" << align << ") access at " << address;
|
||||
}
|
||||
|
||||
extern template void AlignFail<4>(uintptr_t);
|
||||
extern template void AlignFail<8>(uintptr_t);
|
||||
#endif
|
||||
|
||||
class TcParserBase {
|
||||
public:
|
||||
static const char* GenericFallback(PROTOBUF_TC_PARAM_DECL);
|
||||
@ -150,9 +163,14 @@ class TcParserBase {
|
||||
static const char* RepeatedString(PROTOBUF_TC_PARAM_DECL);
|
||||
|
||||
template <typename T>
|
||||
static T& RefAt(void* x, size_t offset) {
|
||||
static inline T& RefAt(void* x, size_t offset) {
|
||||
T* target = reinterpret_cast<T*>(static_cast<char*>(x) + offset);
|
||||
GOOGLE_DCHECK_EQ(0, reinterpret_cast<uintptr_t>(target) % alignof(T));
|
||||
#ifndef NDEBUG
|
||||
if (PROTOBUF_PREDICT_FALSE(
|
||||
reinterpret_cast<uintptr_t>(target) % alignof(T) != 0)) {
|
||||
AlignFail<alignof(T)>(reinterpret_cast<uintptr_t>(target));
|
||||
}
|
||||
#endif
|
||||
return *target;
|
||||
}
|
||||
|
||||
|
@ -34,11 +34,11 @@
|
||||
#else
|
||||
#define PROTOBUF_TCT_EXTERN extern
|
||||
#endif
|
||||
PROTOBUF_TCT_EXTERN template const char *TcParser<1>::ParseLoop(PROTOBUF_NAMESPACE_ID::MessageLite*, char const*, PROTOBUF_NAMESPACE_ID::internal::ParseContext*, PROTOBUF_NAMESPACE_ID::internal::TailCallParseTableBase const*);
|
||||
PROTOBUF_TCT_EXTERN template const char *TcParser<2>::ParseLoop(PROTOBUF_NAMESPACE_ID::MessageLite*, char const*, PROTOBUF_NAMESPACE_ID::internal::ParseContext*, PROTOBUF_NAMESPACE_ID::internal::TailCallParseTableBase const*);
|
||||
PROTOBUF_TCT_EXTERN template const char *TcParser<3>::ParseLoop(PROTOBUF_NAMESPACE_ID::MessageLite*, char const*, PROTOBUF_NAMESPACE_ID::internal::ParseContext*, PROTOBUF_NAMESPACE_ID::internal::TailCallParseTableBase const*);
|
||||
PROTOBUF_TCT_EXTERN template const char *TcParser<4>::ParseLoop(PROTOBUF_NAMESPACE_ID::MessageLite*, char const*, PROTOBUF_NAMESPACE_ID::internal::ParseContext*, PROTOBUF_NAMESPACE_ID::internal::TailCallParseTableBase const*);
|
||||
PROTOBUF_TCT_EXTERN template const char *TcParser<5>::ParseLoop(PROTOBUF_NAMESPACE_ID::MessageLite*, char const*, PROTOBUF_NAMESPACE_ID::internal::ParseContext*, PROTOBUF_NAMESPACE_ID::internal::TailCallParseTableBase const*);
|
||||
PROTOBUF_TCT_EXTERN template const char *TcParser<1>::ParseLoop(::PROTOBUF_NAMESPACE_ID::MessageLite*, char const*, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext*, ::PROTOBUF_NAMESPACE_ID::internal::TailCallParseTableBase const*);
|
||||
PROTOBUF_TCT_EXTERN template const char *TcParser<2>::ParseLoop(::PROTOBUF_NAMESPACE_ID::MessageLite*, char const*, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext*, ::PROTOBUF_NAMESPACE_ID::internal::TailCallParseTableBase const*);
|
||||
PROTOBUF_TCT_EXTERN template const char *TcParser<3>::ParseLoop(::PROTOBUF_NAMESPACE_ID::MessageLite*, char const*, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext*, ::PROTOBUF_NAMESPACE_ID::internal::TailCallParseTableBase const*);
|
||||
PROTOBUF_TCT_EXTERN template const char *TcParser<4>::ParseLoop(::PROTOBUF_NAMESPACE_ID::MessageLite*, char const*, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext*, ::PROTOBUF_NAMESPACE_ID::internal::TailCallParseTableBase const*);
|
||||
PROTOBUF_TCT_EXTERN template const char *TcParser<5>::ParseLoop(::PROTOBUF_NAMESPACE_ID::MessageLite*, char const*, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext*, ::PROTOBUF_NAMESPACE_ID::internal::TailCallParseTableBase const*);
|
||||
PROTOBUF_TCT_EXTERN template const char* TcParser<1>::SingularFixed<uint64_t, uint8_t>(PROTOBUF_TC_PARAM_DECL);
|
||||
PROTOBUF_TCT_EXTERN template const char* TcParser<2>::SingularFixed<uint64_t, uint8_t>(PROTOBUF_TC_PARAM_DECL);
|
||||
PROTOBUF_TCT_EXTERN template const char* TcParser<3>::SingularFixed<uint64_t, uint8_t>(PROTOBUF_TC_PARAM_DECL);
|
||||
|
@ -45,6 +45,11 @@ namespace google {
|
||||
namespace protobuf {
|
||||
namespace internal {
|
||||
|
||||
#ifndef NDEBUG
|
||||
template void AlignFail<4>(uintptr_t);
|
||||
template void AlignFail<8>(uintptr_t);
|
||||
#endif
|
||||
|
||||
const char* TcParserBase::GenericFallbackLite(PROTOBUF_TC_PARAM_DECL) {
|
||||
return GenericFallbackImpl<MessageLite, std::string>(PROTOBUF_TC_PARAM_PASS);
|
||||
}
|
||||
|
@ -1068,7 +1068,7 @@ class Map {
|
||||
|
||||
void** CreateEmptyTable(size_type n) {
|
||||
GOOGLE_DCHECK(n >= kMinTableSize);
|
||||
GOOGLE_DCHECK_EQ(n & (n - 1), 0);
|
||||
GOOGLE_DCHECK_EQ(n & (n - 1), 0u);
|
||||
void** result = Alloc<void*>(n);
|
||||
memset(result, 0, n * sizeof(result[0]));
|
||||
return result;
|
||||
@ -1079,7 +1079,7 @@ class Map {
|
||||
// We get a little bit of randomness from the address of the map. The
|
||||
// lower bits are not very random, due to alignment, so we discard them
|
||||
// and shift the higher bits into their place.
|
||||
size_type s = reinterpret_cast<uintptr_t>(this) >> 12;
|
||||
size_type s = reinterpret_cast<uintptr_t>(this) >> 4;
|
||||
#if defined(__x86_64__) && defined(__GNUC__) && \
|
||||
!defined(GOOGLE_PROTOBUF_NO_RDTSC)
|
||||
uint32_t hi, lo;
|
||||
|
@ -209,84 +209,6 @@ uint64_t Message::GetInvariantPerBuild(uint64_t salt) {
|
||||
return salt;
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
// ZeroFieldsBase
|
||||
|
||||
namespace internal {
|
||||
|
||||
void ZeroFieldsBase::Clear() {
|
||||
_internal_metadata_.Clear<UnknownFieldSet>(); //
|
||||
}
|
||||
|
||||
ZeroFieldsBase::~ZeroFieldsBase() {
|
||||
if (GetArenaForAllocation() != nullptr) return;
|
||||
_internal_metadata_.Delete<UnknownFieldSet>();
|
||||
}
|
||||
|
||||
size_t ZeroFieldsBase::ByteSizeLong() const {
|
||||
return MaybeComputeUnknownFieldsSize(0, &_cached_size_);
|
||||
}
|
||||
|
||||
const char* ZeroFieldsBase::_InternalParse(const char* ptr,
|
||||
internal::ParseContext* ctx) {
|
||||
#define CHK_(x) \
|
||||
if (PROTOBUF_PREDICT_FALSE(!(x))) { \
|
||||
goto failure; \
|
||||
}
|
||||
|
||||
while (!ctx->Done(&ptr)) {
|
||||
uint32_t tag;
|
||||
ptr = internal::ReadTag(ptr, &tag);
|
||||
if ((tag == 0) || ((tag & 7) == 4)) {
|
||||
CHK_(ptr);
|
||||
ctx->SetLastTag(tag);
|
||||
goto message_done;
|
||||
}
|
||||
ptr = UnknownFieldParse(
|
||||
tag, _internal_metadata_.mutable_unknown_fields<UnknownFieldSet>(), ptr,
|
||||
ctx);
|
||||
CHK_(ptr);
|
||||
} // while
|
||||
message_done:
|
||||
return ptr;
|
||||
failure:
|
||||
ptr = nullptr;
|
||||
goto message_done;
|
||||
#undef CHK_
|
||||
}
|
||||
|
||||
::uint8_t* ZeroFieldsBase::_InternalSerialize(
|
||||
::uint8_t* target, io::EpsCopyOutputStream* stream) const {
|
||||
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||||
target = internal::WireFormat::InternalSerializeUnknownFieldsToArray(
|
||||
_internal_metadata_.unknown_fields<UnknownFieldSet>(
|
||||
UnknownFieldSet::default_instance),
|
||||
target, stream);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
void ZeroFieldsBase::MergeImpl(Message* to_param, const Message& from_param) {
|
||||
auto* to = static_cast<ZeroFieldsBase*>(to_param);
|
||||
const auto* from = static_cast<const ZeroFieldsBase*>(&from_param);
|
||||
GOOGLE_DCHECK_NE(from, to);
|
||||
to->_internal_metadata_.MergeFrom<UnknownFieldSet>(from->_internal_metadata_);
|
||||
}
|
||||
|
||||
void ZeroFieldsBase::CopyImpl(Message* to_param, const Message& from_param) {
|
||||
auto* to = static_cast<ZeroFieldsBase*>(to_param);
|
||||
const auto* from = static_cast<const ZeroFieldsBase*>(&from_param);
|
||||
if (from == to) return;
|
||||
to->_internal_metadata_.Clear<UnknownFieldSet>();
|
||||
to->_internal_metadata_.MergeFrom<UnknownFieldSet>(from->_internal_metadata_);
|
||||
}
|
||||
|
||||
void ZeroFieldsBase::InternalSwap(ZeroFieldsBase* other) {
|
||||
_internal_metadata_.Swap<UnknownFieldSet>(&other->_internal_metadata_);
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
|
||||
// =============================================================================
|
||||
// MessageFactory
|
||||
|
||||
|
@ -405,36 +405,6 @@ class PROTOBUF_EXPORT Message : public MessageLite {
|
||||
};
|
||||
|
||||
namespace internal {
|
||||
// To save code size, protos without any fields are derived from ZeroFieldsBase
|
||||
// rather than Message.
|
||||
class PROTOBUF_EXPORT ZeroFieldsBase : public Message {
|
||||
public:
|
||||
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
|
||||
bool IsInitialized() const final { return true; }
|
||||
size_t ByteSizeLong() const final;
|
||||
int GetCachedSize() const final { return _cached_size_.Get(); }
|
||||
const char* _InternalParse(const char* ptr,
|
||||
internal::ParseContext* ctx) final;
|
||||
::uint8_t* _InternalSerialize(::uint8_t* target,
|
||||
io::EpsCopyOutputStream* stream) const final;
|
||||
|
||||
protected:
|
||||
constexpr ZeroFieldsBase() {}
|
||||
explicit ZeroFieldsBase(Arena* arena, bool is_message_owned)
|
||||
: Message(arena, is_message_owned) {}
|
||||
ZeroFieldsBase(const ZeroFieldsBase&) = delete;
|
||||
ZeroFieldsBase& operator=(const ZeroFieldsBase&) = delete;
|
||||
~ZeroFieldsBase() override;
|
||||
|
||||
void SetCachedSize(int size) const final { _cached_size_.Set(size); }
|
||||
|
||||
static void MergeImpl(Message* to, const Message& from);
|
||||
static void CopyImpl(Message* to, const Message& from);
|
||||
void InternalSwap(ZeroFieldsBase* other);
|
||||
|
||||
mutable internal::CachedSize _cached_size_;
|
||||
};
|
||||
|
||||
// Forward-declare interfaces used to implement RepeatedFieldRef.
|
||||
// These are protobuf internals that users shouldn't care about.
|
||||
class RepeatedFieldAccessor;
|
||||
|
@ -289,11 +289,12 @@ const char* ParseContext::ReadSizeAndPushLimitAndDepth(const char* ptr,
|
||||
}
|
||||
|
||||
const char* ParseContext::ParseMessage(MessageLite* msg, const char* ptr) {
|
||||
return ParseMessage<MessageLite>(msg, ptr);
|
||||
}
|
||||
const char* ParseContext::ParseMessage(Message* msg, const char* ptr) {
|
||||
// Use reinterptret case to prevent inclusion of non lite header
|
||||
return ParseMessage(reinterpret_cast<MessageLite*>(msg), ptr);
|
||||
int old;
|
||||
ptr = ReadSizeAndPushLimitAndDepth(ptr, &old);
|
||||
ptr = ptr ? msg->_InternalParse(ptr, this) : nullptr;
|
||||
depth_++;
|
||||
if (!PopLimit(old)) return nullptr;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
inline void WriteVarint(uint64_t val, std::string* s) {
|
||||
|
@ -399,11 +399,15 @@ class PROTOBUF_EXPORT ParseContext : public EpsCopyInputStream {
|
||||
Data& data() { return data_; }
|
||||
const Data& data() const { return data_; }
|
||||
|
||||
template <typename T>
|
||||
PROTOBUF_MUST_USE_RESULT const char* ParseMessage(T* msg, const char* ptr);
|
||||
// We outline when the type is generic and we go through a virtual
|
||||
const char* ParseMessage(MessageLite* msg, const char* ptr);
|
||||
const char* ParseMessage(Message* msg, const char* ptr);
|
||||
|
||||
// This overload supports those few cases where ParseMessage is called
|
||||
// on a class that is not actually a proto message.
|
||||
// TODO(jorg): Eliminate this use case.
|
||||
template <typename T,
|
||||
typename std::enable_if<!std::is_base_of<MessageLite, T>::value,
|
||||
bool>::type = true>
|
||||
PROTOBUF_MUST_USE_RESULT const char* ParseMessage(T* msg, const char* ptr);
|
||||
|
||||
template <typename T>
|
||||
PROTOBUF_MUST_USE_RESULT PROTOBUF_NDEBUG_INLINE const char* ParseGroup(
|
||||
@ -654,7 +658,8 @@ inline int32_t ReadVarintZigZag32(const char** p) {
|
||||
return WireFormatLite::ZigZagDecode32(static_cast<uint32_t>(tmp));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
template <typename T, typename std::enable_if<
|
||||
!std::is_base_of<MessageLite, T>::value, bool>::type>
|
||||
PROTOBUF_MUST_USE_RESULT const char* ParseContext::ParseMessage(
|
||||
T* msg, const char* ptr) {
|
||||
int old;
|
||||
|
@ -230,8 +230,9 @@
|
||||
#error PROTOBUF_TAILCALL was previously defined
|
||||
#endif
|
||||
#if __has_cpp_attribute(clang::musttail) && \
|
||||
!defined(_ARCH_PPC) && !defined(__wasm__)
|
||||
!defined(__arm__) && !defined(_ARCH_PPC) && !defined(__wasm__)
|
||||
# ifndef PROTO2_OPENSOURCE
|
||||
// Compilation fails on ARM32: b/195943306
|
||||
// Compilation fails on powerpc64le: b/187985113
|
||||
# endif
|
||||
#define PROTOBUF_MUSTTAIL [[clang::musttail]]
|
||||
@ -463,6 +464,10 @@
|
||||
#error PROTOBUF_FORCE_COPY_IN_SWAP was previously defined
|
||||
#endif
|
||||
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
#error PROTOBUF_FORCE_COPY_IN_MOVE was previously defined
|
||||
#endif
|
||||
|
||||
#ifdef PROTOBUF_FALLTHROUGH_INTENDED
|
||||
#error PROTOBUF_FALLTHROUGH_INTENDED was previously defined
|
||||
#endif
|
||||
@ -602,10 +607,15 @@
|
||||
#ifdef PROTOBUF_ATTRIBUTE_WEAK
|
||||
#error PROTOBUF_ATTRIBUTE_WEAK was previously defined
|
||||
#endif
|
||||
#if __has_attribute(weak) && !defined(__MINGW32__)
|
||||
#if __has_attribute(weak) && \
|
||||
!defined(__APPLE__) && \
|
||||
(!defined(_WIN32) || __clang_major__ < 9) && \
|
||||
!defined(__MINGW32__)
|
||||
#define PROTOBUF_ATTRIBUTE_WEAK __attribute__((weak))
|
||||
#define PROTOBUF_HAVE_ATTRIBUTE_WEAK 1
|
||||
#else
|
||||
#define PROTOBUF_ATTRIBUTE_WEAK
|
||||
#define PROTOBUF_HAVE_ATTRIBUTE_WEAK 0
|
||||
#endif
|
||||
|
||||
// Macros to detect sanitizers.
|
||||
|
@ -66,6 +66,7 @@
|
||||
#undef PROTOBUF_MUST_USE_RESULT
|
||||
#undef PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||
#undef PROTOBUF_FORCE_COPY_IN_SWAP
|
||||
#undef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
#undef PROTOBUF_NAMESPACE_OPEN
|
||||
#undef PROTOBUF_NAMESPACE_CLOSE
|
||||
#undef PROTOBUF_UNUSED
|
||||
@ -78,6 +79,7 @@
|
||||
#undef PROTOBUF_MESSAGE_OWNED_ARENA_EXPERIMENT
|
||||
#undef PROTOBUF_CONSTINIT
|
||||
#undef PROTOBUF_ATTRIBUTE_WEAK
|
||||
#undef PROTOBUF_HAVE_ATTRIBUTE_WEAK
|
||||
#undef PROTOBUF_ATTRIBUTE_NO_DESTROY
|
||||
#undef PROTOBUF_ATTRIBUTE_INIT_PRIORITY
|
||||
#undef PROTOBUF_PRAGMA_INIT_SEG
|
||||
|
@ -218,13 +218,13 @@ class RepeatedField final {
|
||||
// Calling this routine inside a loop can cause quadratic behavior.
|
||||
void ExtractSubrange(int start, int num, Element* elements);
|
||||
|
||||
void Clear();
|
||||
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear();
|
||||
void MergeFrom(const RepeatedField& other);
|
||||
void CopyFrom(const RepeatedField& other);
|
||||
PROTOBUF_ATTRIBUTE_REINITIALIZES void CopyFrom(const RepeatedField& other);
|
||||
|
||||
// Replaces the contents with RepeatedField(begin, end).
|
||||
template <typename Iter>
|
||||
void Assign(Iter begin, Iter end);
|
||||
PROTOBUF_ATTRIBUTE_REINITIALIZES void Assign(Iter begin, Iter end);
|
||||
|
||||
// Reserve space to expand the field to at least the given size. If the
|
||||
// array is grown, it will always be at least doubled in size.
|
||||
@ -975,13 +975,13 @@ class RepeatedPtrField final : private internal::RepeatedPtrFieldBase {
|
||||
// Calling this routine inside a loop can cause quadratic behavior.
|
||||
void DeleteSubrange(int start, int num);
|
||||
|
||||
void Clear();
|
||||
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear();
|
||||
void MergeFrom(const RepeatedPtrField& other);
|
||||
void CopyFrom(const RepeatedPtrField& other);
|
||||
PROTOBUF_ATTRIBUTE_REINITIALIZES void CopyFrom(const RepeatedPtrField& other);
|
||||
|
||||
// Replaces the contents with RepeatedPtrField(begin, end).
|
||||
template <typename Iter>
|
||||
void Assign(Iter begin, Iter end);
|
||||
PROTOBUF_ATTRIBUTE_REINITIALIZES void Assign(Iter begin, Iter end);
|
||||
|
||||
// Reserve space to expand the field to at least the given size. This only
|
||||
// resizes the pointer array; it doesn't allocate any objects. If the
|
||||
@ -1250,6 +1250,9 @@ inline RepeatedField<Element>& RepeatedField<Element>::operator=(
|
||||
template <typename Element>
|
||||
inline RepeatedField<Element>::RepeatedField(RepeatedField&& other) noexcept
|
||||
: RepeatedField() {
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
CopyFrom(other);
|
||||
#else // PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
// We don't just call Swap(&other) here because it would perform 3 copies if
|
||||
// other is on an arena. This field can't be on an arena because arena
|
||||
// construction always uses the Arena* accepting constructor.
|
||||
@ -1258,6 +1261,7 @@ inline RepeatedField<Element>::RepeatedField(RepeatedField&& other) noexcept
|
||||
} else {
|
||||
InternalSwap(&other);
|
||||
}
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
}
|
||||
|
||||
template <typename Element>
|
||||
@ -1266,7 +1270,11 @@ inline RepeatedField<Element>& RepeatedField<Element>::operator=(
|
||||
// We don't just call Swap(&other) here because it would perform 3 copies if
|
||||
// the two fields are on different arenas.
|
||||
if (this != &other) {
|
||||
if (this->GetArena() != other.GetArena()) {
|
||||
if (GetArena() != other.GetArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
|| GetArena() == nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
CopyFrom(other);
|
||||
} else {
|
||||
InternalSwap(&other);
|
||||
@ -1978,7 +1986,6 @@ void RepeatedPtrFieldBase::AddAllocatedSlowWithCopy(
|
||||
// Pass value_arena and my_arena to avoid duplicate virtual call (value) or
|
||||
// load (mine).
|
||||
typename TypeHandler::Type* value, Arena* value_arena, Arena* my_arena) {
|
||||
GOOGLE_DCHECK(value_arena == nullptr || value_arena == my_arena);
|
||||
// Ensure that either the value is in the same arena, or if not, we do the
|
||||
// appropriate thing: Own() it (if it's on heap and we're in an arena) or copy
|
||||
// it to our arena/heap (otherwise).
|
||||
@ -2170,6 +2177,9 @@ template <typename Element>
|
||||
inline RepeatedPtrField<Element>::RepeatedPtrField(
|
||||
RepeatedPtrField&& other) noexcept
|
||||
: RepeatedPtrField() {
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
CopyFrom(other);
|
||||
#else // PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
// We don't just call Swap(&other) here because it would perform 3 copies if
|
||||
// other is on an arena. This field can't be on an arena because arena
|
||||
// construction always uses the Arena* accepting constructor.
|
||||
@ -2178,6 +2188,7 @@ inline RepeatedPtrField<Element>::RepeatedPtrField(
|
||||
} else {
|
||||
InternalSwap(&other);
|
||||
}
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
}
|
||||
|
||||
template <typename Element>
|
||||
@ -2186,7 +2197,11 @@ inline RepeatedPtrField<Element>& RepeatedPtrField<Element>::operator=(
|
||||
// We don't just call Swap(&other) here because it would perform 3 copies if
|
||||
// the two fields are on different arenas.
|
||||
if (this != &other) {
|
||||
if (this->GetArena() != other.GetArena()) {
|
||||
if (GetArena() != other.GetArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
|| GetArena() == nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
CopyFrom(other);
|
||||
} else {
|
||||
InternalSwap(&other);
|
||||
|
@ -1154,7 +1154,7 @@ TEST(RepeatedPtrField, ClearedElements) {
|
||||
}
|
||||
|
||||
// Test all code paths in AddAllocated().
|
||||
TEST(RepeatedPtrField, AddAlocated) {
|
||||
TEST(RepeatedPtrField, AddAllocated) {
|
||||
RepeatedPtrField<std::string> field;
|
||||
while (field.size() < field.Capacity()) {
|
||||
field.Add()->assign("filler");
|
||||
@ -1199,6 +1199,13 @@ TEST(RepeatedPtrField, AddAlocated) {
|
||||
EXPECT_EQ(qux, &field.Get(index));
|
||||
}
|
||||
|
||||
TEST(RepeatedPtrField, AddAllocatedDifferentArena) {
|
||||
RepeatedPtrField<TestAllTypes> field;
|
||||
Arena arena;
|
||||
auto* msg = Arena::CreateMessage<TestAllTypes>(&arena);
|
||||
field.AddAllocated(msg);
|
||||
}
|
||||
|
||||
TEST(RepeatedPtrField, MergeFrom) {
|
||||
RepeatedPtrField<std::string> source, destination;
|
||||
source.Add()->assign("4");
|
||||
|
@ -36,19 +36,19 @@ static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_s
|
||||
|
||||
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceContext, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::SourceContext, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceContext, file_name_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::SourceContext, file_name_),
|
||||
};
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
{ 0, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::SourceContext)},
|
||||
{ 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::SourceContext)},
|
||||
};
|
||||
|
||||
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_),
|
||||
};
|
||||
|
||||
const char descriptor_table_protodef_google_2fprotobuf_2fsource_5fcontext_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
||||
@ -274,8 +274,8 @@ void SourceContext::InternalSwap(SourceContext* other) {
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::SourceContext* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::SourceContext >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::SourceContext >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::SourceContext* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::SourceContext >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::SourceContext >(arena);
|
||||
}
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
|
@ -59,7 +59,7 @@ struct SourceContextDefaultTypeInternal;
|
||||
PROTOBUF_EXPORT extern SourceContextDefaultTypeInternal _SourceContext_default_instance_;
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::SourceContext* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::SourceContext>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::SourceContext* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::SourceContext>(Arena*);
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
|
||||
@ -84,7 +84,11 @@ class PROTOBUF_EXPORT SourceContext final :
|
||||
}
|
||||
inline SourceContext& operator=(SourceContext&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
|
@ -70,27 +70,27 @@ static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptor
|
||||
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fstruct_2eproto = nullptr;
|
||||
|
||||
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fstruct_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, _has_bits_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, _has_bits_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, key_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, value_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, key_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, value_),
|
||||
0,
|
||||
1,
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Struct, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct, fields_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Struct, fields_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Value, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Value, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Value, _oneof_case_[0]),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Value, _oneof_case_[0]),
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
|
||||
@ -99,27 +99,27 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fstruct_2ep
|
||||
::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
|
||||
::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
|
||||
::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Value, kind_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Value, kind_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ListValue, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ListValue, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ListValue, values_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ListValue, values_),
|
||||
};
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
{ 0, 8, -1, sizeof(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse)},
|
||||
{ 10, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::Struct)},
|
||||
{ 17, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::Value)},
|
||||
{ 30, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::ListValue)},
|
||||
{ 0, 8, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse)},
|
||||
{ 10, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Struct)},
|
||||
{ 17, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Value)},
|
||||
{ 30, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::ListValue)},
|
||||
};
|
||||
|
||||
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Struct_FieldsEntry_DoNotUse_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Struct_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Value_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_ListValue_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_Struct_FieldsEntry_DoNotUse_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_Struct_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_Value_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_ListValue_default_instance_),
|
||||
};
|
||||
|
||||
const char descriptor_table_protodef_google_2fprotobuf_2fstruct_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
||||
@ -293,7 +293,7 @@ failure:
|
||||
|
||||
// map<string, .google.protobuf.Value> fields = 1;
|
||||
if (!this->_internal_fields().empty()) {
|
||||
typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_pointer
|
||||
typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >::const_pointer
|
||||
ConstPtr;
|
||||
typedef ConstPtr SortItem;
|
||||
typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
|
||||
@ -311,9 +311,9 @@ failure:
|
||||
this->_internal_fields().size() > 1) {
|
||||
::std::unique_ptr<SortItem[]> items(
|
||||
new SortItem[this->_internal_fields().size()]);
|
||||
typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::size_type size_type;
|
||||
typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >::size_type size_type;
|
||||
size_type n = 0;
|
||||
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator
|
||||
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >::const_iterator
|
||||
it = this->_internal_fields().begin();
|
||||
it != this->_internal_fields().end(); ++it, ++n) {
|
||||
items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
|
||||
@ -324,7 +324,7 @@ failure:
|
||||
Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
|
||||
}
|
||||
} else {
|
||||
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator
|
||||
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >::const_iterator
|
||||
it = this->_internal_fields().begin();
|
||||
it != this->_internal_fields().end(); ++it) {
|
||||
target = Struct_FieldsEntry_DoNotUse::Funcs::InternalSerialize(1, it->first, it->second, target, stream);
|
||||
@ -352,7 +352,7 @@ size_t Struct::ByteSizeLong() const {
|
||||
// map<string, .google.protobuf.Value> fields = 1;
|
||||
total_size += 1 *
|
||||
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_fields_size());
|
||||
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator
|
||||
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >::const_iterator
|
||||
it = this->_internal_fields().begin();
|
||||
it != this->_internal_fields().end(); ++it) {
|
||||
total_size += Struct_FieldsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
|
||||
@ -411,24 +411,24 @@ void Struct::InternalSwap(Struct* other) {
|
||||
|
||||
class Value::_Internal {
|
||||
public:
|
||||
static const PROTOBUF_NAMESPACE_ID::Struct& struct_value(const Value* msg);
|
||||
static const PROTOBUF_NAMESPACE_ID::ListValue& list_value(const Value* msg);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Struct& struct_value(const Value* msg);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::ListValue& list_value(const Value* msg);
|
||||
};
|
||||
|
||||
const PROTOBUF_NAMESPACE_ID::Struct&
|
||||
const ::PROTOBUF_NAMESPACE_ID::Struct&
|
||||
Value::_Internal::struct_value(const Value* msg) {
|
||||
return *msg->kind_.struct_value_;
|
||||
}
|
||||
const PROTOBUF_NAMESPACE_ID::ListValue&
|
||||
const ::PROTOBUF_NAMESPACE_ID::ListValue&
|
||||
Value::_Internal::list_value(const Value* msg) {
|
||||
return *msg->kind_.list_value_;
|
||||
}
|
||||
void Value::set_allocated_struct_value(PROTOBUF_NAMESPACE_ID::Struct* struct_value) {
|
||||
void Value::set_allocated_struct_value(::PROTOBUF_NAMESPACE_ID::Struct* struct_value) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
||||
clear_kind();
|
||||
if (struct_value) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
|
||||
::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<PROTOBUF_NAMESPACE_ID::Struct>::GetOwningArena(struct_value);
|
||||
::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::PROTOBUF_NAMESPACE_ID::Struct>::GetOwningArena(struct_value);
|
||||
if (message_arena != submessage_arena) {
|
||||
struct_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
|
||||
message_arena, struct_value, submessage_arena);
|
||||
@ -438,12 +438,12 @@ void Value::set_allocated_struct_value(PROTOBUF_NAMESPACE_ID::Struct* struct_val
|
||||
}
|
||||
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.struct_value)
|
||||
}
|
||||
void Value::set_allocated_list_value(PROTOBUF_NAMESPACE_ID::ListValue* list_value) {
|
||||
void Value::set_allocated_list_value(::PROTOBUF_NAMESPACE_ID::ListValue* list_value) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
||||
clear_kind();
|
||||
if (list_value) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
|
||||
::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<PROTOBUF_NAMESPACE_ID::ListValue>::GetOwningArena(list_value);
|
||||
::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::PROTOBUF_NAMESPACE_ID::ListValue>::GetOwningArena(list_value);
|
||||
if (message_arena != submessage_arena) {
|
||||
list_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
|
||||
message_arena, list_value, submessage_arena);
|
||||
@ -484,11 +484,11 @@ Value::Value(const Value& from)
|
||||
break;
|
||||
}
|
||||
case kStructValue: {
|
||||
_internal_mutable_struct_value()->PROTOBUF_NAMESPACE_ID::Struct::MergeFrom(from._internal_struct_value());
|
||||
_internal_mutable_struct_value()->::PROTOBUF_NAMESPACE_ID::Struct::MergeFrom(from._internal_struct_value());
|
||||
break;
|
||||
}
|
||||
case kListValue: {
|
||||
_internal_mutable_list_value()->PROTOBUF_NAMESPACE_ID::ListValue::MergeFrom(from._internal_list_value());
|
||||
_internal_mutable_list_value()->::PROTOBUF_NAMESPACE_ID::ListValue::MergeFrom(from._internal_list_value());
|
||||
break;
|
||||
}
|
||||
case KIND_NOT_SET: {
|
||||
@ -586,7 +586,7 @@ const char* Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
|
||||
::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||||
CHK_(ptr);
|
||||
_internal_set_null_value(static_cast<PROTOBUF_NAMESPACE_ID::NullValue>(val));
|
||||
_internal_set_null_value(static_cast<::PROTOBUF_NAMESPACE_ID::NullValue>(val));
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
@ -804,11 +804,11 @@ void Value::MergeFrom(const Value& from) {
|
||||
break;
|
||||
}
|
||||
case kStructValue: {
|
||||
_internal_mutable_struct_value()->PROTOBUF_NAMESPACE_ID::Struct::MergeFrom(from._internal_struct_value());
|
||||
_internal_mutable_struct_value()->::PROTOBUF_NAMESPACE_ID::Struct::MergeFrom(from._internal_struct_value());
|
||||
break;
|
||||
}
|
||||
case kListValue: {
|
||||
_internal_mutable_list_value()->PROTOBUF_NAMESPACE_ID::ListValue::MergeFrom(from._internal_list_value());
|
||||
_internal_mutable_list_value()->::PROTOBUF_NAMESPACE_ID::ListValue::MergeFrom(from._internal_list_value());
|
||||
break;
|
||||
}
|
||||
case KIND_NOT_SET: {
|
||||
@ -1030,17 +1030,17 @@ void ListValue::InternalSwap(ListValue* other) {
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Struct* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Struct >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Struct >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Struct* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Struct >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Struct >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Value* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Value >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Value >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Value* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Value >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Value >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::ListValue* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::ListValue >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::ListValue >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::ListValue* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::ListValue >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::ListValue >(arena);
|
||||
}
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
|
@ -72,10 +72,10 @@ struct ValueDefaultTypeInternal;
|
||||
PROTOBUF_EXPORT extern ValueDefaultTypeInternal _Value_default_instance_;
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::ListValue* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::ListValue>(Arena*);
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Struct* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Struct>(Arena*);
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse>(Arena*);
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Value* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Value>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::ListValue* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::ListValue>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::Struct* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Struct>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::Value* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Value>(Arena*);
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
|
||||
@ -106,12 +106,12 @@ inline bool NullValue_Parse(
|
||||
// ===================================================================
|
||||
|
||||
class Struct_FieldsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry<Struct_FieldsEntry_DoNotUse,
|
||||
std::string, PROTOBUF_NAMESPACE_ID::Value,
|
||||
std::string, ::PROTOBUF_NAMESPACE_ID::Value,
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> {
|
||||
public:
|
||||
typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry<Struct_FieldsEntry_DoNotUse,
|
||||
std::string, PROTOBUF_NAMESPACE_ID::Value,
|
||||
std::string, ::PROTOBUF_NAMESPACE_ID::Value,
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> SuperType;
|
||||
Struct_FieldsEntry_DoNotUse();
|
||||
@ -149,7 +149,11 @@ class PROTOBUF_EXPORT Struct final :
|
||||
}
|
||||
inline Struct& operator=(Struct&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
@ -255,14 +259,14 @@ class PROTOBUF_EXPORT Struct final :
|
||||
public:
|
||||
void clear_fields();
|
||||
private:
|
||||
const ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >&
|
||||
const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >&
|
||||
_internal_fields() const;
|
||||
::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >*
|
||||
::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >*
|
||||
_internal_mutable_fields();
|
||||
public:
|
||||
const ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >&
|
||||
const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >&
|
||||
fields() const;
|
||||
::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >*
|
||||
::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >*
|
||||
mutable_fields();
|
||||
|
||||
// @@protoc_insertion_point(class_scope:google.protobuf.Struct)
|
||||
@ -274,7 +278,7 @@ class PROTOBUF_EXPORT Struct final :
|
||||
typedef void DestructorSkippable_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::MapField<
|
||||
Struct_FieldsEntry_DoNotUse,
|
||||
std::string, PROTOBUF_NAMESPACE_ID::Value,
|
||||
std::string, ::PROTOBUF_NAMESPACE_ID::Value,
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> fields_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
@ -301,7 +305,11 @@ class PROTOBUF_EXPORT Value final :
|
||||
}
|
||||
inline Value& operator=(Value&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
@ -420,11 +428,11 @@ class PROTOBUF_EXPORT Value final :
|
||||
bool _internal_has_null_value() const;
|
||||
public:
|
||||
void clear_null_value();
|
||||
PROTOBUF_NAMESPACE_ID::NullValue null_value() const;
|
||||
void set_null_value(PROTOBUF_NAMESPACE_ID::NullValue value);
|
||||
::PROTOBUF_NAMESPACE_ID::NullValue null_value() const;
|
||||
void set_null_value(::PROTOBUF_NAMESPACE_ID::NullValue value);
|
||||
private:
|
||||
PROTOBUF_NAMESPACE_ID::NullValue _internal_null_value() const;
|
||||
void _internal_set_null_value(PROTOBUF_NAMESPACE_ID::NullValue value);
|
||||
::PROTOBUF_NAMESPACE_ID::NullValue _internal_null_value() const;
|
||||
void _internal_set_null_value(::PROTOBUF_NAMESPACE_ID::NullValue value);
|
||||
public:
|
||||
|
||||
// double number_value = 2;
|
||||
@ -477,17 +485,17 @@ class PROTOBUF_EXPORT Value final :
|
||||
bool _internal_has_struct_value() const;
|
||||
public:
|
||||
void clear_struct_value();
|
||||
const PROTOBUF_NAMESPACE_ID::Struct& struct_value() const;
|
||||
PROTOBUF_MUST_USE_RESULT PROTOBUF_NAMESPACE_ID::Struct* release_struct_value();
|
||||
PROTOBUF_NAMESPACE_ID::Struct* mutable_struct_value();
|
||||
void set_allocated_struct_value(PROTOBUF_NAMESPACE_ID::Struct* struct_value);
|
||||
const ::PROTOBUF_NAMESPACE_ID::Struct& struct_value() const;
|
||||
PROTOBUF_MUST_USE_RESULT ::PROTOBUF_NAMESPACE_ID::Struct* release_struct_value();
|
||||
::PROTOBUF_NAMESPACE_ID::Struct* mutable_struct_value();
|
||||
void set_allocated_struct_value(::PROTOBUF_NAMESPACE_ID::Struct* struct_value);
|
||||
private:
|
||||
const PROTOBUF_NAMESPACE_ID::Struct& _internal_struct_value() const;
|
||||
PROTOBUF_NAMESPACE_ID::Struct* _internal_mutable_struct_value();
|
||||
const ::PROTOBUF_NAMESPACE_ID::Struct& _internal_struct_value() const;
|
||||
::PROTOBUF_NAMESPACE_ID::Struct* _internal_mutable_struct_value();
|
||||
public:
|
||||
void unsafe_arena_set_allocated_struct_value(
|
||||
PROTOBUF_NAMESPACE_ID::Struct* struct_value);
|
||||
PROTOBUF_NAMESPACE_ID::Struct* unsafe_arena_release_struct_value();
|
||||
::PROTOBUF_NAMESPACE_ID::Struct* struct_value);
|
||||
::PROTOBUF_NAMESPACE_ID::Struct* unsafe_arena_release_struct_value();
|
||||
|
||||
// .google.protobuf.ListValue list_value = 6;
|
||||
bool has_list_value() const;
|
||||
@ -495,17 +503,17 @@ class PROTOBUF_EXPORT Value final :
|
||||
bool _internal_has_list_value() const;
|
||||
public:
|
||||
void clear_list_value();
|
||||
const PROTOBUF_NAMESPACE_ID::ListValue& list_value() const;
|
||||
PROTOBUF_MUST_USE_RESULT PROTOBUF_NAMESPACE_ID::ListValue* release_list_value();
|
||||
PROTOBUF_NAMESPACE_ID::ListValue* mutable_list_value();
|
||||
void set_allocated_list_value(PROTOBUF_NAMESPACE_ID::ListValue* list_value);
|
||||
const ::PROTOBUF_NAMESPACE_ID::ListValue& list_value() const;
|
||||
PROTOBUF_MUST_USE_RESULT ::PROTOBUF_NAMESPACE_ID::ListValue* release_list_value();
|
||||
::PROTOBUF_NAMESPACE_ID::ListValue* mutable_list_value();
|
||||
void set_allocated_list_value(::PROTOBUF_NAMESPACE_ID::ListValue* list_value);
|
||||
private:
|
||||
const PROTOBUF_NAMESPACE_ID::ListValue& _internal_list_value() const;
|
||||
PROTOBUF_NAMESPACE_ID::ListValue* _internal_mutable_list_value();
|
||||
const ::PROTOBUF_NAMESPACE_ID::ListValue& _internal_list_value() const;
|
||||
::PROTOBUF_NAMESPACE_ID::ListValue* _internal_mutable_list_value();
|
||||
public:
|
||||
void unsafe_arena_set_allocated_list_value(
|
||||
PROTOBUF_NAMESPACE_ID::ListValue* list_value);
|
||||
PROTOBUF_NAMESPACE_ID::ListValue* unsafe_arena_release_list_value();
|
||||
::PROTOBUF_NAMESPACE_ID::ListValue* list_value);
|
||||
::PROTOBUF_NAMESPACE_ID::ListValue* unsafe_arena_release_list_value();
|
||||
|
||||
void clear_kind();
|
||||
KindCase kind_case() const;
|
||||
@ -532,8 +540,8 @@ class PROTOBUF_EXPORT Value final :
|
||||
double number_value_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr string_value_;
|
||||
bool bool_value_;
|
||||
PROTOBUF_NAMESPACE_ID::Struct* struct_value_;
|
||||
PROTOBUF_NAMESPACE_ID::ListValue* list_value_;
|
||||
::PROTOBUF_NAMESPACE_ID::Struct* struct_value_;
|
||||
::PROTOBUF_NAMESPACE_ID::ListValue* list_value_;
|
||||
} kind_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 _oneof_case_[1];
|
||||
@ -561,7 +569,11 @@ class PROTOBUF_EXPORT ListValue final :
|
||||
}
|
||||
inline ListValue& operator=(ListValue&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
@ -665,16 +677,16 @@ class PROTOBUF_EXPORT ListValue final :
|
||||
int _internal_values_size() const;
|
||||
public:
|
||||
void clear_values();
|
||||
PROTOBUF_NAMESPACE_ID::Value* mutable_values(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Value >*
|
||||
::PROTOBUF_NAMESPACE_ID::Value* mutable_values(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Value >*
|
||||
mutable_values();
|
||||
private:
|
||||
const PROTOBUF_NAMESPACE_ID::Value& _internal_values(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::Value* _internal_add_values();
|
||||
const ::PROTOBUF_NAMESPACE_ID::Value& _internal_values(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::Value* _internal_add_values();
|
||||
public:
|
||||
const PROTOBUF_NAMESPACE_ID::Value& values(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::Value* add_values();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Value >&
|
||||
const ::PROTOBUF_NAMESPACE_ID::Value& values(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::Value* add_values();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Value >&
|
||||
values() const;
|
||||
|
||||
// @@protoc_insertion_point(class_scope:google.protobuf.ListValue)
|
||||
@ -684,7 +696,7 @@ class PROTOBUF_EXPORT ListValue final :
|
||||
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
|
||||
typedef void InternalArenaConstructable_;
|
||||
typedef void DestructorSkippable_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Value > values_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Value > values_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto;
|
||||
};
|
||||
@ -711,20 +723,20 @@ inline int Struct::fields_size() const {
|
||||
inline void Struct::clear_fields() {
|
||||
fields_.Clear();
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >&
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >&
|
||||
Struct::_internal_fields() const {
|
||||
return fields_.GetMap();
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >&
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >&
|
||||
Struct::fields() const {
|
||||
// @@protoc_insertion_point(field_map:google.protobuf.Struct.fields)
|
||||
return _internal_fields();
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >*
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >*
|
||||
Struct::_internal_mutable_fields() {
|
||||
return fields_.MutableMap();
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >*
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >*
|
||||
Struct::mutable_fields() {
|
||||
// @@protoc_insertion_point(field_mutable_map:google.protobuf.Struct.fields)
|
||||
return _internal_mutable_fields();
|
||||
@ -750,24 +762,24 @@ inline void Value::clear_null_value() {
|
||||
clear_has_kind();
|
||||
}
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::NullValue Value::_internal_null_value() const {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::NullValue Value::_internal_null_value() const {
|
||||
if (_internal_has_null_value()) {
|
||||
return static_cast< PROTOBUF_NAMESPACE_ID::NullValue >(kind_.null_value_);
|
||||
return static_cast< ::PROTOBUF_NAMESPACE_ID::NullValue >(kind_.null_value_);
|
||||
}
|
||||
return static_cast< PROTOBUF_NAMESPACE_ID::NullValue >(0);
|
||||
return static_cast< ::PROTOBUF_NAMESPACE_ID::NullValue >(0);
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::NullValue Value::null_value() const {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::NullValue Value::null_value() const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.Value.null_value)
|
||||
return _internal_null_value();
|
||||
}
|
||||
inline void Value::_internal_set_null_value(PROTOBUF_NAMESPACE_ID::NullValue value) {
|
||||
inline void Value::_internal_set_null_value(::PROTOBUF_NAMESPACE_ID::NullValue value) {
|
||||
if (!_internal_has_null_value()) {
|
||||
clear_kind();
|
||||
set_has_null_value();
|
||||
}
|
||||
kind_.null_value_ = value;
|
||||
}
|
||||
inline void Value::set_null_value(PROTOBUF_NAMESPACE_ID::NullValue value) {
|
||||
inline void Value::set_null_value(::PROTOBUF_NAMESPACE_ID::NullValue value) {
|
||||
_internal_set_null_value(value);
|
||||
// @@protoc_insertion_point(field_set:google.protobuf.Value.null_value)
|
||||
}
|
||||
@ -948,11 +960,11 @@ inline void Value::clear_struct_value() {
|
||||
clear_has_kind();
|
||||
}
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Struct* Value::release_struct_value() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Struct* Value::release_struct_value() {
|
||||
// @@protoc_insertion_point(field_release:google.protobuf.Value.struct_value)
|
||||
if (_internal_has_struct_value()) {
|
||||
clear_has_kind();
|
||||
PROTOBUF_NAMESPACE_ID::Struct* temp = kind_.struct_value_;
|
||||
::PROTOBUF_NAMESPACE_ID::Struct* temp = kind_.struct_value_;
|
||||
if (GetArenaForAllocation() != nullptr) {
|
||||
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
|
||||
}
|
||||
@ -962,27 +974,27 @@ inline PROTOBUF_NAMESPACE_ID::Struct* Value::release_struct_value() {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Struct& Value::_internal_struct_value() const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Struct& Value::_internal_struct_value() const {
|
||||
return _internal_has_struct_value()
|
||||
? *kind_.struct_value_
|
||||
: reinterpret_cast< PROTOBUF_NAMESPACE_ID::Struct&>(PROTOBUF_NAMESPACE_ID::_Struct_default_instance_);
|
||||
: reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::Struct&>(::PROTOBUF_NAMESPACE_ID::_Struct_default_instance_);
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Struct& Value::struct_value() const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Struct& Value::struct_value() const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.Value.struct_value)
|
||||
return _internal_struct_value();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Struct* Value::unsafe_arena_release_struct_value() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Struct* Value::unsafe_arena_release_struct_value() {
|
||||
// @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.struct_value)
|
||||
if (_internal_has_struct_value()) {
|
||||
clear_has_kind();
|
||||
PROTOBUF_NAMESPACE_ID::Struct* temp = kind_.struct_value_;
|
||||
::PROTOBUF_NAMESPACE_ID::Struct* temp = kind_.struct_value_;
|
||||
kind_.struct_value_ = nullptr;
|
||||
return temp;
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
inline void Value::unsafe_arena_set_allocated_struct_value(PROTOBUF_NAMESPACE_ID::Struct* struct_value) {
|
||||
inline void Value::unsafe_arena_set_allocated_struct_value(::PROTOBUF_NAMESPACE_ID::Struct* struct_value) {
|
||||
clear_kind();
|
||||
if (struct_value) {
|
||||
set_has_struct_value();
|
||||
@ -990,16 +1002,16 @@ inline void Value::unsafe_arena_set_allocated_struct_value(PROTOBUF_NAMESPACE_ID
|
||||
}
|
||||
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.struct_value)
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Struct* Value::_internal_mutable_struct_value() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Struct* Value::_internal_mutable_struct_value() {
|
||||
if (!_internal_has_struct_value()) {
|
||||
clear_kind();
|
||||
set_has_struct_value();
|
||||
kind_.struct_value_ = CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Struct >(GetArenaForAllocation());
|
||||
kind_.struct_value_ = CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Struct >(GetArenaForAllocation());
|
||||
}
|
||||
return kind_.struct_value_;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Struct* Value::mutable_struct_value() {
|
||||
PROTOBUF_NAMESPACE_ID::Struct* _msg = _internal_mutable_struct_value();
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Struct* Value::mutable_struct_value() {
|
||||
::PROTOBUF_NAMESPACE_ID::Struct* _msg = _internal_mutable_struct_value();
|
||||
// @@protoc_insertion_point(field_mutable:google.protobuf.Value.struct_value)
|
||||
return _msg;
|
||||
}
|
||||
@ -1022,11 +1034,11 @@ inline void Value::clear_list_value() {
|
||||
clear_has_kind();
|
||||
}
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::ListValue* Value::release_list_value() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::ListValue* Value::release_list_value() {
|
||||
// @@protoc_insertion_point(field_release:google.protobuf.Value.list_value)
|
||||
if (_internal_has_list_value()) {
|
||||
clear_has_kind();
|
||||
PROTOBUF_NAMESPACE_ID::ListValue* temp = kind_.list_value_;
|
||||
::PROTOBUF_NAMESPACE_ID::ListValue* temp = kind_.list_value_;
|
||||
if (GetArenaForAllocation() != nullptr) {
|
||||
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
|
||||
}
|
||||
@ -1036,27 +1048,27 @@ inline PROTOBUF_NAMESPACE_ID::ListValue* Value::release_list_value() {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::ListValue& Value::_internal_list_value() const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::ListValue& Value::_internal_list_value() const {
|
||||
return _internal_has_list_value()
|
||||
? *kind_.list_value_
|
||||
: reinterpret_cast< PROTOBUF_NAMESPACE_ID::ListValue&>(PROTOBUF_NAMESPACE_ID::_ListValue_default_instance_);
|
||||
: reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::ListValue&>(::PROTOBUF_NAMESPACE_ID::_ListValue_default_instance_);
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::ListValue& Value::list_value() const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::ListValue& Value::list_value() const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.Value.list_value)
|
||||
return _internal_list_value();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::ListValue* Value::unsafe_arena_release_list_value() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::ListValue* Value::unsafe_arena_release_list_value() {
|
||||
// @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.list_value)
|
||||
if (_internal_has_list_value()) {
|
||||
clear_has_kind();
|
||||
PROTOBUF_NAMESPACE_ID::ListValue* temp = kind_.list_value_;
|
||||
::PROTOBUF_NAMESPACE_ID::ListValue* temp = kind_.list_value_;
|
||||
kind_.list_value_ = nullptr;
|
||||
return temp;
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
inline void Value::unsafe_arena_set_allocated_list_value(PROTOBUF_NAMESPACE_ID::ListValue* list_value) {
|
||||
inline void Value::unsafe_arena_set_allocated_list_value(::PROTOBUF_NAMESPACE_ID::ListValue* list_value) {
|
||||
clear_kind();
|
||||
if (list_value) {
|
||||
set_has_list_value();
|
||||
@ -1064,16 +1076,16 @@ inline void Value::unsafe_arena_set_allocated_list_value(PROTOBUF_NAMESPACE_ID::
|
||||
}
|
||||
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.list_value)
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::ListValue* Value::_internal_mutable_list_value() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::ListValue* Value::_internal_mutable_list_value() {
|
||||
if (!_internal_has_list_value()) {
|
||||
clear_kind();
|
||||
set_has_list_value();
|
||||
kind_.list_value_ = CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::ListValue >(GetArenaForAllocation());
|
||||
kind_.list_value_ = CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::ListValue >(GetArenaForAllocation());
|
||||
}
|
||||
return kind_.list_value_;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::ListValue* Value::mutable_list_value() {
|
||||
PROTOBUF_NAMESPACE_ID::ListValue* _msg = _internal_mutable_list_value();
|
||||
inline ::PROTOBUF_NAMESPACE_ID::ListValue* Value::mutable_list_value() {
|
||||
::PROTOBUF_NAMESPACE_ID::ListValue* _msg = _internal_mutable_list_value();
|
||||
// @@protoc_insertion_point(field_mutable:google.protobuf.Value.list_value)
|
||||
return _msg;
|
||||
}
|
||||
@ -1101,31 +1113,31 @@ inline int ListValue::values_size() const {
|
||||
inline void ListValue::clear_values() {
|
||||
values_.Clear();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Value* ListValue::mutable_values(int index) {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Value* ListValue::mutable_values(int index) {
|
||||
// @@protoc_insertion_point(field_mutable:google.protobuf.ListValue.values)
|
||||
return values_.Mutable(index);
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Value >*
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Value >*
|
||||
ListValue::mutable_values() {
|
||||
// @@protoc_insertion_point(field_mutable_list:google.protobuf.ListValue.values)
|
||||
return &values_;
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Value& ListValue::_internal_values(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Value& ListValue::_internal_values(int index) const {
|
||||
return values_.Get(index);
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Value& ListValue::values(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Value& ListValue::values(int index) const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.ListValue.values)
|
||||
return _internal_values(index);
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Value* ListValue::_internal_add_values() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Value* ListValue::_internal_add_values() {
|
||||
return values_.Add();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Value* ListValue::add_values() {
|
||||
PROTOBUF_NAMESPACE_ID::Value* _add = _internal_add_values();
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Value* ListValue::add_values() {
|
||||
::PROTOBUF_NAMESPACE_ID::Value* _add = _internal_add_values();
|
||||
// @@protoc_insertion_point(field_add:google.protobuf.ListValue.values)
|
||||
return _add;
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Value >&
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Value >&
|
||||
ListValue::values() const {
|
||||
// @@protoc_insertion_point(field_list:google.protobuf.ListValue.values)
|
||||
return values_;
|
||||
@ -1147,10 +1159,10 @@ PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
|
||||
template <> struct is_proto_enum< PROTOBUF_NAMESPACE_ID::NullValue> : ::std::true_type {};
|
||||
template <> struct is_proto_enum< ::PROTOBUF_NAMESPACE_ID::NullValue> : ::std::true_type {};
|
||||
template <>
|
||||
inline const EnumDescriptor* GetEnumDescriptor< PROTOBUF_NAMESPACE_ID::NullValue>() {
|
||||
return PROTOBUF_NAMESPACE_ID::NullValue_descriptor();
|
||||
inline const EnumDescriptor* GetEnumDescriptor< ::PROTOBUF_NAMESPACE_ID::NullValue>() {
|
||||
return ::PROTOBUF_NAMESPACE_ID::NullValue_descriptor();
|
||||
}
|
||||
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
@ -37,20 +37,20 @@ static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_s
|
||||
|
||||
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2ftimestamp_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Timestamp, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Timestamp, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Timestamp, seconds_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Timestamp, nanos_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Timestamp, seconds_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Timestamp, nanos_),
|
||||
};
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
{ 0, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::Timestamp)},
|
||||
{ 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Timestamp)},
|
||||
};
|
||||
|
||||
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_),
|
||||
};
|
||||
|
||||
const char descriptor_table_protodef_google_2fprotobuf_2ftimestamp_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
||||
@ -291,8 +291,8 @@ void Timestamp::InternalSwap(Timestamp* other) {
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Timestamp* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Timestamp >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Timestamp >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Timestamp* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Timestamp >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Timestamp >(arena);
|
||||
}
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
|
@ -59,7 +59,7 @@ struct TimestampDefaultTypeInternal;
|
||||
PROTOBUF_EXPORT extern TimestampDefaultTypeInternal _Timestamp_default_instance_;
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Timestamp* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Timestamp>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::Timestamp* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Timestamp>(Arena*);
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
|
||||
@ -84,7 +84,11 @@ class PROTOBUF_EXPORT Timestamp final :
|
||||
}
|
||||
inline Timestamp& operator=(Timestamp&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
|
@ -109,76 +109,76 @@ static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_s
|
||||
|
||||
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2ftype_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, name_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, fields_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, oneofs_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, options_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, source_context_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, syntax_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, name_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, fields_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, oneofs_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, options_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, source_context_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, syntax_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, kind_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, cardinality_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, number_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, name_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, type_url_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, oneof_index_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, packed_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, options_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, json_name_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, default_value_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, kind_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, cardinality_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, number_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, name_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, type_url_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, oneof_index_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, packed_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, options_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, json_name_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, default_value_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, name_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, enumvalue_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, options_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, source_context_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, syntax_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, name_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, enumvalue_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, options_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, source_context_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, syntax_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValue, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValue, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValue, name_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValue, number_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValue, options_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValue, name_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValue, number_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValue, options_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Option, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Option, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Option, name_),
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Option, value_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Option, name_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Option, value_),
|
||||
};
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
{ 0, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::Type)},
|
||||
{ 12, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::Field)},
|
||||
{ 28, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::Enum)},
|
||||
{ 39, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::EnumValue)},
|
||||
{ 48, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::Option)},
|
||||
{ 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Type)},
|
||||
{ 12, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Field)},
|
||||
{ 28, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Enum)},
|
||||
{ 39, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::EnumValue)},
|
||||
{ 48, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Option)},
|
||||
};
|
||||
|
||||
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Type_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Field_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Enum_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_EnumValue_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Option_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_Type_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_Field_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_Enum_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_EnumValue_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_Option_default_instance_),
|
||||
};
|
||||
|
||||
const char descriptor_table_protodef_google_2fprotobuf_2ftype_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
||||
@ -340,10 +340,10 @@ bool Syntax_IsValid(int value) {
|
||||
|
||||
class Type::_Internal {
|
||||
public:
|
||||
static const PROTOBUF_NAMESPACE_ID::SourceContext& source_context(const Type* msg);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::SourceContext& source_context(const Type* msg);
|
||||
};
|
||||
|
||||
const PROTOBUF_NAMESPACE_ID::SourceContext&
|
||||
const ::PROTOBUF_NAMESPACE_ID::SourceContext&
|
||||
Type::_Internal::source_context(const Type* msg) {
|
||||
return *msg->source_context_;
|
||||
}
|
||||
@ -377,7 +377,7 @@ Type::Type(const Type& from)
|
||||
GetArenaForAllocation());
|
||||
}
|
||||
if (from._internal_has_source_context()) {
|
||||
source_context_ = new PROTOBUF_NAMESPACE_ID::SourceContext(*from.source_context_);
|
||||
source_context_ = new ::PROTOBUF_NAMESPACE_ID::SourceContext(*from.source_context_);
|
||||
} else {
|
||||
source_context_ = nullptr;
|
||||
}
|
||||
@ -504,7 +504,7 @@ const char* Type::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) {
|
||||
::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||||
CHK_(ptr);
|
||||
_internal_set_syntax(static_cast<PROTOBUF_NAMESPACE_ID::Syntax>(val));
|
||||
_internal_set_syntax(static_cast<::PROTOBUF_NAMESPACE_ID::Syntax>(val));
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
@ -675,7 +675,7 @@ void Type::MergeFrom(const Type& from) {
|
||||
_internal_set_name(from._internal_name());
|
||||
}
|
||||
if (from._internal_has_source_context()) {
|
||||
_internal_mutable_source_context()->PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(from._internal_source_context());
|
||||
_internal_mutable_source_context()->::PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(from._internal_source_context());
|
||||
}
|
||||
if (from._internal_syntax() != 0) {
|
||||
_internal_set_syntax(from._internal_syntax());
|
||||
@ -831,7 +831,7 @@ const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
|
||||
::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||||
CHK_(ptr);
|
||||
_internal_set_kind(static_cast<PROTOBUF_NAMESPACE_ID::Field_Kind>(val));
|
||||
_internal_set_kind(static_cast<::PROTOBUF_NAMESPACE_ID::Field_Kind>(val));
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
@ -840,7 +840,7 @@ const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
|
||||
::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||||
CHK_(ptr);
|
||||
_internal_set_cardinality(static_cast<PROTOBUF_NAMESPACE_ID::Field_Cardinality>(val));
|
||||
_internal_set_cardinality(static_cast<::PROTOBUF_NAMESPACE_ID::Field_Cardinality>(val));
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
@ -1216,10 +1216,10 @@ void Field::InternalSwap(Field* other) {
|
||||
|
||||
class Enum::_Internal {
|
||||
public:
|
||||
static const PROTOBUF_NAMESPACE_ID::SourceContext& source_context(const Enum* msg);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::SourceContext& source_context(const Enum* msg);
|
||||
};
|
||||
|
||||
const PROTOBUF_NAMESPACE_ID::SourceContext&
|
||||
const ::PROTOBUF_NAMESPACE_ID::SourceContext&
|
||||
Enum::_Internal::source_context(const Enum* msg) {
|
||||
return *msg->source_context_;
|
||||
}
|
||||
@ -1251,7 +1251,7 @@ Enum::Enum(const Enum& from)
|
||||
GetArenaForAllocation());
|
||||
}
|
||||
if (from._internal_has_source_context()) {
|
||||
source_context_ = new PROTOBUF_NAMESPACE_ID::SourceContext(*from.source_context_);
|
||||
source_context_ = new ::PROTOBUF_NAMESPACE_ID::SourceContext(*from.source_context_);
|
||||
} else {
|
||||
source_context_ = nullptr;
|
||||
}
|
||||
@ -1362,7 +1362,7 @@ const char* Enum::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
|
||||
::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||||
CHK_(ptr);
|
||||
_internal_set_syntax(static_cast<PROTOBUF_NAMESPACE_ID::Syntax>(val));
|
||||
_internal_set_syntax(static_cast<::PROTOBUF_NAMESPACE_ID::Syntax>(val));
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
@ -1514,7 +1514,7 @@ void Enum::MergeFrom(const Enum& from) {
|
||||
_internal_set_name(from._internal_name());
|
||||
}
|
||||
if (from._internal_has_source_context()) {
|
||||
_internal_mutable_source_context()->PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(from._internal_source_context());
|
||||
_internal_mutable_source_context()->::PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(from._internal_source_context());
|
||||
}
|
||||
if (from._internal_syntax() != 0) {
|
||||
_internal_set_syntax(from._internal_syntax());
|
||||
@ -1819,10 +1819,10 @@ void EnumValue::InternalSwap(EnumValue* other) {
|
||||
|
||||
class Option::_Internal {
|
||||
public:
|
||||
static const PROTOBUF_NAMESPACE_ID::Any& value(const Option* msg);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Any& value(const Option* msg);
|
||||
};
|
||||
|
||||
const PROTOBUF_NAMESPACE_ID::Any&
|
||||
const ::PROTOBUF_NAMESPACE_ID::Any&
|
||||
Option::_Internal::value(const Option* msg) {
|
||||
return *msg->value_;
|
||||
}
|
||||
@ -1850,7 +1850,7 @@ Option::Option(const Option& from)
|
||||
GetArenaForAllocation());
|
||||
}
|
||||
if (from._internal_has_value()) {
|
||||
value_ = new PROTOBUF_NAMESPACE_ID::Any(*from.value_);
|
||||
value_ = new ::PROTOBUF_NAMESPACE_ID::Any(*from.value_);
|
||||
} else {
|
||||
value_ = nullptr;
|
||||
}
|
||||
@ -2026,7 +2026,7 @@ void Option::MergeFrom(const Option& from) {
|
||||
_internal_set_name(from._internal_name());
|
||||
}
|
||||
if (from._internal_has_value()) {
|
||||
_internal_mutable_value()->PROTOBUF_NAMESPACE_ID::Any::MergeFrom(from._internal_value());
|
||||
_internal_mutable_value()->::PROTOBUF_NAMESPACE_ID::Any::MergeFrom(from._internal_value());
|
||||
}
|
||||
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||
}
|
||||
@ -2064,20 +2064,20 @@ void Option::InternalSwap(Option* other) {
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Type* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Type >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Type >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Type* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Type >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Type >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Field* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Field >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Field >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Field* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Field >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Field >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Enum* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Enum >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Enum >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Enum* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Enum >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Enum >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::EnumValue* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::EnumValue >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::EnumValue >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::EnumValue* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::EnumValue >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::EnumValue >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Option* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Option >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Option >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Option* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Option >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Option >(arena);
|
||||
}
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
|
@ -74,11 +74,11 @@ struct TypeDefaultTypeInternal;
|
||||
PROTOBUF_EXPORT extern TypeDefaultTypeInternal _Type_default_instance_;
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Enum* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Enum>(Arena*);
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::EnumValue* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::EnumValue>(Arena*);
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Field* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Field>(Arena*);
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Option* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Option>(Arena*);
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Type* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Type>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::Enum* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Enum>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::EnumValue* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::EnumValue>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::Field* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Field>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::Option* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Option>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::Type* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Type>(Arena*);
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
|
||||
@ -197,7 +197,11 @@ class PROTOBUF_EXPORT Type final :
|
||||
}
|
||||
inline Type& operator=(Type&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
@ -306,16 +310,16 @@ class PROTOBUF_EXPORT Type final :
|
||||
int _internal_fields_size() const;
|
||||
public:
|
||||
void clear_fields();
|
||||
PROTOBUF_NAMESPACE_ID::Field* mutable_fields(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Field >*
|
||||
::PROTOBUF_NAMESPACE_ID::Field* mutable_fields(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Field >*
|
||||
mutable_fields();
|
||||
private:
|
||||
const PROTOBUF_NAMESPACE_ID::Field& _internal_fields(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::Field* _internal_add_fields();
|
||||
const ::PROTOBUF_NAMESPACE_ID::Field& _internal_fields(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::Field* _internal_add_fields();
|
||||
public:
|
||||
const PROTOBUF_NAMESPACE_ID::Field& fields(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::Field* add_fields();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Field >&
|
||||
const ::PROTOBUF_NAMESPACE_ID::Field& fields(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::Field* add_fields();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Field >&
|
||||
fields() const;
|
||||
|
||||
// repeated string oneofs = 3;
|
||||
@ -348,16 +352,16 @@ class PROTOBUF_EXPORT Type final :
|
||||
int _internal_options_size() const;
|
||||
public:
|
||||
void clear_options();
|
||||
PROTOBUF_NAMESPACE_ID::Option* mutable_options(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >*
|
||||
::PROTOBUF_NAMESPACE_ID::Option* mutable_options(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >*
|
||||
mutable_options();
|
||||
private:
|
||||
const PROTOBUF_NAMESPACE_ID::Option& _internal_options(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::Option* _internal_add_options();
|
||||
const ::PROTOBUF_NAMESPACE_ID::Option& _internal_options(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::Option* _internal_add_options();
|
||||
public:
|
||||
const PROTOBUF_NAMESPACE_ID::Option& options(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::Option* add_options();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >&
|
||||
const ::PROTOBUF_NAMESPACE_ID::Option& options(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::Option* add_options();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >&
|
||||
options() const;
|
||||
|
||||
// string name = 1;
|
||||
@ -380,25 +384,25 @@ class PROTOBUF_EXPORT Type final :
|
||||
bool _internal_has_source_context() const;
|
||||
public:
|
||||
void clear_source_context();
|
||||
const PROTOBUF_NAMESPACE_ID::SourceContext& source_context() const;
|
||||
PROTOBUF_MUST_USE_RESULT PROTOBUF_NAMESPACE_ID::SourceContext* release_source_context();
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* mutable_source_context();
|
||||
void set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceContext* source_context);
|
||||
const ::PROTOBUF_NAMESPACE_ID::SourceContext& source_context() const;
|
||||
PROTOBUF_MUST_USE_RESULT ::PROTOBUF_NAMESPACE_ID::SourceContext* release_source_context();
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* mutable_source_context();
|
||||
void set_allocated_source_context(::PROTOBUF_NAMESPACE_ID::SourceContext* source_context);
|
||||
private:
|
||||
const PROTOBUF_NAMESPACE_ID::SourceContext& _internal_source_context() const;
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* _internal_mutable_source_context();
|
||||
const ::PROTOBUF_NAMESPACE_ID::SourceContext& _internal_source_context() const;
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* _internal_mutable_source_context();
|
||||
public:
|
||||
void unsafe_arena_set_allocated_source_context(
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* source_context);
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* unsafe_arena_release_source_context();
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* source_context);
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* unsafe_arena_release_source_context();
|
||||
|
||||
// .google.protobuf.Syntax syntax = 6;
|
||||
void clear_syntax();
|
||||
PROTOBUF_NAMESPACE_ID::Syntax syntax() const;
|
||||
void set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value);
|
||||
::PROTOBUF_NAMESPACE_ID::Syntax syntax() const;
|
||||
void set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value);
|
||||
private:
|
||||
PROTOBUF_NAMESPACE_ID::Syntax _internal_syntax() const;
|
||||
void _internal_set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value);
|
||||
::PROTOBUF_NAMESPACE_ID::Syntax _internal_syntax() const;
|
||||
void _internal_set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value);
|
||||
public:
|
||||
|
||||
// @@protoc_insertion_point(class_scope:google.protobuf.Type)
|
||||
@ -408,11 +412,11 @@ class PROTOBUF_EXPORT Type final :
|
||||
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
|
||||
typedef void InternalArenaConstructable_;
|
||||
typedef void DestructorSkippable_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Field > fields_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Field > fields_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string> oneofs_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option > options_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option > options_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* source_context_;
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* source_context_;
|
||||
int syntax_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
friend struct ::TableStruct_google_2fprotobuf_2ftype_2eproto;
|
||||
@ -438,7 +442,11 @@ class PROTOBUF_EXPORT Field final :
|
||||
}
|
||||
inline Field& operator=(Field&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
@ -649,16 +657,16 @@ class PROTOBUF_EXPORT Field final :
|
||||
int _internal_options_size() const;
|
||||
public:
|
||||
void clear_options();
|
||||
PROTOBUF_NAMESPACE_ID::Option* mutable_options(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >*
|
||||
::PROTOBUF_NAMESPACE_ID::Option* mutable_options(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >*
|
||||
mutable_options();
|
||||
private:
|
||||
const PROTOBUF_NAMESPACE_ID::Option& _internal_options(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::Option* _internal_add_options();
|
||||
const ::PROTOBUF_NAMESPACE_ID::Option& _internal_options(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::Option* _internal_add_options();
|
||||
public:
|
||||
const PROTOBUF_NAMESPACE_ID::Option& options(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::Option* add_options();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >&
|
||||
const ::PROTOBUF_NAMESPACE_ID::Option& options(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::Option* add_options();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >&
|
||||
options() const;
|
||||
|
||||
// string name = 4;
|
||||
@ -719,20 +727,20 @@ class PROTOBUF_EXPORT Field final :
|
||||
|
||||
// .google.protobuf.Field.Kind kind = 1;
|
||||
void clear_kind();
|
||||
PROTOBUF_NAMESPACE_ID::Field_Kind kind() const;
|
||||
void set_kind(PROTOBUF_NAMESPACE_ID::Field_Kind value);
|
||||
::PROTOBUF_NAMESPACE_ID::Field_Kind kind() const;
|
||||
void set_kind(::PROTOBUF_NAMESPACE_ID::Field_Kind value);
|
||||
private:
|
||||
PROTOBUF_NAMESPACE_ID::Field_Kind _internal_kind() const;
|
||||
void _internal_set_kind(PROTOBUF_NAMESPACE_ID::Field_Kind value);
|
||||
::PROTOBUF_NAMESPACE_ID::Field_Kind _internal_kind() const;
|
||||
void _internal_set_kind(::PROTOBUF_NAMESPACE_ID::Field_Kind value);
|
||||
public:
|
||||
|
||||
// .google.protobuf.Field.Cardinality cardinality = 2;
|
||||
void clear_cardinality();
|
||||
PROTOBUF_NAMESPACE_ID::Field_Cardinality cardinality() const;
|
||||
void set_cardinality(PROTOBUF_NAMESPACE_ID::Field_Cardinality value);
|
||||
::PROTOBUF_NAMESPACE_ID::Field_Cardinality cardinality() const;
|
||||
void set_cardinality(::PROTOBUF_NAMESPACE_ID::Field_Cardinality value);
|
||||
private:
|
||||
PROTOBUF_NAMESPACE_ID::Field_Cardinality _internal_cardinality() const;
|
||||
void _internal_set_cardinality(PROTOBUF_NAMESPACE_ID::Field_Cardinality value);
|
||||
::PROTOBUF_NAMESPACE_ID::Field_Cardinality _internal_cardinality() const;
|
||||
void _internal_set_cardinality(::PROTOBUF_NAMESPACE_ID::Field_Cardinality value);
|
||||
public:
|
||||
|
||||
// int32 number = 3;
|
||||
@ -769,7 +777,7 @@ class PROTOBUF_EXPORT Field final :
|
||||
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
|
||||
typedef void InternalArenaConstructable_;
|
||||
typedef void DestructorSkippable_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option > options_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option > options_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_url_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr json_name_;
|
||||
@ -803,7 +811,11 @@ class PROTOBUF_EXPORT Enum final :
|
||||
}
|
||||
inline Enum& operator=(Enum&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
@ -911,16 +923,16 @@ class PROTOBUF_EXPORT Enum final :
|
||||
int _internal_enumvalue_size() const;
|
||||
public:
|
||||
void clear_enumvalue();
|
||||
PROTOBUF_NAMESPACE_ID::EnumValue* mutable_enumvalue(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumValue >*
|
||||
::PROTOBUF_NAMESPACE_ID::EnumValue* mutable_enumvalue(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumValue >*
|
||||
mutable_enumvalue();
|
||||
private:
|
||||
const PROTOBUF_NAMESPACE_ID::EnumValue& _internal_enumvalue(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::EnumValue* _internal_add_enumvalue();
|
||||
const ::PROTOBUF_NAMESPACE_ID::EnumValue& _internal_enumvalue(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::EnumValue* _internal_add_enumvalue();
|
||||
public:
|
||||
const PROTOBUF_NAMESPACE_ID::EnumValue& enumvalue(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::EnumValue* add_enumvalue();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumValue >&
|
||||
const ::PROTOBUF_NAMESPACE_ID::EnumValue& enumvalue(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::EnumValue* add_enumvalue();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumValue >&
|
||||
enumvalue() const;
|
||||
|
||||
// repeated .google.protobuf.Option options = 3;
|
||||
@ -929,16 +941,16 @@ class PROTOBUF_EXPORT Enum final :
|
||||
int _internal_options_size() const;
|
||||
public:
|
||||
void clear_options();
|
||||
PROTOBUF_NAMESPACE_ID::Option* mutable_options(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >*
|
||||
::PROTOBUF_NAMESPACE_ID::Option* mutable_options(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >*
|
||||
mutable_options();
|
||||
private:
|
||||
const PROTOBUF_NAMESPACE_ID::Option& _internal_options(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::Option* _internal_add_options();
|
||||
const ::PROTOBUF_NAMESPACE_ID::Option& _internal_options(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::Option* _internal_add_options();
|
||||
public:
|
||||
const PROTOBUF_NAMESPACE_ID::Option& options(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::Option* add_options();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >&
|
||||
const ::PROTOBUF_NAMESPACE_ID::Option& options(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::Option* add_options();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >&
|
||||
options() const;
|
||||
|
||||
// string name = 1;
|
||||
@ -961,25 +973,25 @@ class PROTOBUF_EXPORT Enum final :
|
||||
bool _internal_has_source_context() const;
|
||||
public:
|
||||
void clear_source_context();
|
||||
const PROTOBUF_NAMESPACE_ID::SourceContext& source_context() const;
|
||||
PROTOBUF_MUST_USE_RESULT PROTOBUF_NAMESPACE_ID::SourceContext* release_source_context();
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* mutable_source_context();
|
||||
void set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceContext* source_context);
|
||||
const ::PROTOBUF_NAMESPACE_ID::SourceContext& source_context() const;
|
||||
PROTOBUF_MUST_USE_RESULT ::PROTOBUF_NAMESPACE_ID::SourceContext* release_source_context();
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* mutable_source_context();
|
||||
void set_allocated_source_context(::PROTOBUF_NAMESPACE_ID::SourceContext* source_context);
|
||||
private:
|
||||
const PROTOBUF_NAMESPACE_ID::SourceContext& _internal_source_context() const;
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* _internal_mutable_source_context();
|
||||
const ::PROTOBUF_NAMESPACE_ID::SourceContext& _internal_source_context() const;
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* _internal_mutable_source_context();
|
||||
public:
|
||||
void unsafe_arena_set_allocated_source_context(
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* source_context);
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* unsafe_arena_release_source_context();
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* source_context);
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* unsafe_arena_release_source_context();
|
||||
|
||||
// .google.protobuf.Syntax syntax = 5;
|
||||
void clear_syntax();
|
||||
PROTOBUF_NAMESPACE_ID::Syntax syntax() const;
|
||||
void set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value);
|
||||
::PROTOBUF_NAMESPACE_ID::Syntax syntax() const;
|
||||
void set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value);
|
||||
private:
|
||||
PROTOBUF_NAMESPACE_ID::Syntax _internal_syntax() const;
|
||||
void _internal_set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value);
|
||||
::PROTOBUF_NAMESPACE_ID::Syntax _internal_syntax() const;
|
||||
void _internal_set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value);
|
||||
public:
|
||||
|
||||
// @@protoc_insertion_point(class_scope:google.protobuf.Enum)
|
||||
@ -989,10 +1001,10 @@ class PROTOBUF_EXPORT Enum final :
|
||||
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
|
||||
typedef void InternalArenaConstructable_;
|
||||
typedef void DestructorSkippable_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumValue > enumvalue_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option > options_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumValue > enumvalue_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option > options_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* source_context_;
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* source_context_;
|
||||
int syntax_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
friend struct ::TableStruct_google_2fprotobuf_2ftype_2eproto;
|
||||
@ -1018,7 +1030,11 @@ class PROTOBUF_EXPORT EnumValue final :
|
||||
}
|
||||
inline EnumValue& operator=(EnumValue&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
@ -1124,16 +1140,16 @@ class PROTOBUF_EXPORT EnumValue final :
|
||||
int _internal_options_size() const;
|
||||
public:
|
||||
void clear_options();
|
||||
PROTOBUF_NAMESPACE_ID::Option* mutable_options(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >*
|
||||
::PROTOBUF_NAMESPACE_ID::Option* mutable_options(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >*
|
||||
mutable_options();
|
||||
private:
|
||||
const PROTOBUF_NAMESPACE_ID::Option& _internal_options(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::Option* _internal_add_options();
|
||||
const ::PROTOBUF_NAMESPACE_ID::Option& _internal_options(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::Option* _internal_add_options();
|
||||
public:
|
||||
const PROTOBUF_NAMESPACE_ID::Option& options(int index) const;
|
||||
PROTOBUF_NAMESPACE_ID::Option* add_options();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >&
|
||||
const ::PROTOBUF_NAMESPACE_ID::Option& options(int index) const;
|
||||
::PROTOBUF_NAMESPACE_ID::Option* add_options();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >&
|
||||
options() const;
|
||||
|
||||
// string name = 1;
|
||||
@ -1166,7 +1182,7 @@ class PROTOBUF_EXPORT EnumValue final :
|
||||
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
|
||||
typedef void InternalArenaConstructable_;
|
||||
typedef void DestructorSkippable_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option > options_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option > options_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
|
||||
::PROTOBUF_NAMESPACE_ID::int32 number_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
@ -1193,7 +1209,11 @@ class PROTOBUF_EXPORT Option final :
|
||||
}
|
||||
inline Option& operator=(Option&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
@ -1312,17 +1332,17 @@ class PROTOBUF_EXPORT Option final :
|
||||
bool _internal_has_value() const;
|
||||
public:
|
||||
void clear_value();
|
||||
const PROTOBUF_NAMESPACE_ID::Any& value() const;
|
||||
PROTOBUF_MUST_USE_RESULT PROTOBUF_NAMESPACE_ID::Any* release_value();
|
||||
PROTOBUF_NAMESPACE_ID::Any* mutable_value();
|
||||
void set_allocated_value(PROTOBUF_NAMESPACE_ID::Any* value);
|
||||
const ::PROTOBUF_NAMESPACE_ID::Any& value() const;
|
||||
PROTOBUF_MUST_USE_RESULT ::PROTOBUF_NAMESPACE_ID::Any* release_value();
|
||||
::PROTOBUF_NAMESPACE_ID::Any* mutable_value();
|
||||
void set_allocated_value(::PROTOBUF_NAMESPACE_ID::Any* value);
|
||||
private:
|
||||
const PROTOBUF_NAMESPACE_ID::Any& _internal_value() const;
|
||||
PROTOBUF_NAMESPACE_ID::Any* _internal_mutable_value();
|
||||
const ::PROTOBUF_NAMESPACE_ID::Any& _internal_value() const;
|
||||
::PROTOBUF_NAMESPACE_ID::Any* _internal_mutable_value();
|
||||
public:
|
||||
void unsafe_arena_set_allocated_value(
|
||||
PROTOBUF_NAMESPACE_ID::Any* value);
|
||||
PROTOBUF_NAMESPACE_ID::Any* unsafe_arena_release_value();
|
||||
::PROTOBUF_NAMESPACE_ID::Any* value);
|
||||
::PROTOBUF_NAMESPACE_ID::Any* unsafe_arena_release_value();
|
||||
|
||||
// @@protoc_insertion_point(class_scope:google.protobuf.Option)
|
||||
private:
|
||||
@ -1332,7 +1352,7 @@ class PROTOBUF_EXPORT Option final :
|
||||
typedef void InternalArenaConstructable_;
|
||||
typedef void DestructorSkippable_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
|
||||
PROTOBUF_NAMESPACE_ID::Any* value_;
|
||||
::PROTOBUF_NAMESPACE_ID::Any* value_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
friend struct ::TableStruct_google_2fprotobuf_2ftype_2eproto;
|
||||
};
|
||||
@ -1403,31 +1423,31 @@ inline int Type::fields_size() const {
|
||||
inline void Type::clear_fields() {
|
||||
fields_.Clear();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Field* Type::mutable_fields(int index) {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Field* Type::mutable_fields(int index) {
|
||||
// @@protoc_insertion_point(field_mutable:google.protobuf.Type.fields)
|
||||
return fields_.Mutable(index);
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Field >*
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Field >*
|
||||
Type::mutable_fields() {
|
||||
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.fields)
|
||||
return &fields_;
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Field& Type::_internal_fields(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Field& Type::_internal_fields(int index) const {
|
||||
return fields_.Get(index);
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Field& Type::fields(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Field& Type::fields(int index) const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.Type.fields)
|
||||
return _internal_fields(index);
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Field* Type::_internal_add_fields() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Field* Type::_internal_add_fields() {
|
||||
return fields_.Add();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Field* Type::add_fields() {
|
||||
PROTOBUF_NAMESPACE_ID::Field* _add = _internal_add_fields();
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Field* Type::add_fields() {
|
||||
::PROTOBUF_NAMESPACE_ID::Field* _add = _internal_add_fields();
|
||||
// @@protoc_insertion_point(field_add:google.protobuf.Type.fields)
|
||||
return _add;
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Field >&
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Field >&
|
||||
Type::fields() const {
|
||||
// @@protoc_insertion_point(field_list:google.protobuf.Type.fields)
|
||||
return fields_;
|
||||
@ -1518,31 +1538,31 @@ inline int Type::options_size() const {
|
||||
inline void Type::clear_options() {
|
||||
options_.Clear();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Option* Type::mutable_options(int index) {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Option* Type::mutable_options(int index) {
|
||||
// @@protoc_insertion_point(field_mutable:google.protobuf.Type.options)
|
||||
return options_.Mutable(index);
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >*
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >*
|
||||
Type::mutable_options() {
|
||||
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.options)
|
||||
return &options_;
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Option& Type::_internal_options(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Option& Type::_internal_options(int index) const {
|
||||
return options_.Get(index);
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Option& Type::options(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Option& Type::options(int index) const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.Type.options)
|
||||
return _internal_options(index);
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Option* Type::_internal_add_options() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Option* Type::_internal_add_options() {
|
||||
return options_.Add();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Option* Type::add_options() {
|
||||
PROTOBUF_NAMESPACE_ID::Option* _add = _internal_add_options();
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Option* Type::add_options() {
|
||||
::PROTOBUF_NAMESPACE_ID::Option* _add = _internal_add_options();
|
||||
// @@protoc_insertion_point(field_add:google.protobuf.Type.options)
|
||||
return _add;
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >&
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >&
|
||||
Type::options() const {
|
||||
// @@protoc_insertion_point(field_list:google.protobuf.Type.options)
|
||||
return options_;
|
||||
@ -1555,17 +1575,17 @@ inline bool Type::_internal_has_source_context() const {
|
||||
inline bool Type::has_source_context() const {
|
||||
return _internal_has_source_context();
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::SourceContext& Type::_internal_source_context() const {
|
||||
const PROTOBUF_NAMESPACE_ID::SourceContext* p = source_context_;
|
||||
return p != nullptr ? *p : reinterpret_cast<const PROTOBUF_NAMESPACE_ID::SourceContext&>(
|
||||
PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_);
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::SourceContext& Type::_internal_source_context() const {
|
||||
const ::PROTOBUF_NAMESPACE_ID::SourceContext* p = source_context_;
|
||||
return p != nullptr ? *p : reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::SourceContext&>(
|
||||
::PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_);
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::SourceContext& Type::source_context() const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::SourceContext& Type::source_context() const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.Type.source_context)
|
||||
return _internal_source_context();
|
||||
}
|
||||
inline void Type::unsafe_arena_set_allocated_source_context(
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* source_context) {
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* source_context) {
|
||||
if (GetArenaForAllocation() == nullptr) {
|
||||
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context_);
|
||||
}
|
||||
@ -1577,9 +1597,9 @@ inline void Type::unsafe_arena_set_allocated_source_context(
|
||||
}
|
||||
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Type.source_context)
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::SourceContext* Type::release_source_context() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Type::release_source_context() {
|
||||
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* temp = source_context_;
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* temp = source_context_;
|
||||
source_context_ = nullptr;
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
|
||||
@ -1592,27 +1612,27 @@ inline PROTOBUF_NAMESPACE_ID::SourceContext* Type::release_source_context() {
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||
return temp;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::SourceContext* Type::unsafe_arena_release_source_context() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Type::unsafe_arena_release_source_context() {
|
||||
// @@protoc_insertion_point(field_release:google.protobuf.Type.source_context)
|
||||
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* temp = source_context_;
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* temp = source_context_;
|
||||
source_context_ = nullptr;
|
||||
return temp;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::SourceContext* Type::_internal_mutable_source_context() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Type::_internal_mutable_source_context() {
|
||||
|
||||
if (source_context_ == nullptr) {
|
||||
auto* p = CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::SourceContext>(GetArenaForAllocation());
|
||||
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::SourceContext>(GetArenaForAllocation());
|
||||
source_context_ = p;
|
||||
}
|
||||
return source_context_;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::SourceContext* Type::mutable_source_context() {
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* _msg = _internal_mutable_source_context();
|
||||
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Type::mutable_source_context() {
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* _msg = _internal_mutable_source_context();
|
||||
// @@protoc_insertion_point(field_mutable:google.protobuf.Type.source_context)
|
||||
return _msg;
|
||||
}
|
||||
inline void Type::set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceContext* source_context) {
|
||||
inline void Type::set_allocated_source_context(::PROTOBUF_NAMESPACE_ID::SourceContext* source_context) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context_);
|
||||
@ -1638,18 +1658,18 @@ inline void Type::set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceCont
|
||||
inline void Type::clear_syntax() {
|
||||
syntax_ = 0;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Syntax Type::_internal_syntax() const {
|
||||
return static_cast< PROTOBUF_NAMESPACE_ID::Syntax >(syntax_);
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Syntax Type::_internal_syntax() const {
|
||||
return static_cast< ::PROTOBUF_NAMESPACE_ID::Syntax >(syntax_);
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Syntax Type::syntax() const {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Syntax Type::syntax() const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.Type.syntax)
|
||||
return _internal_syntax();
|
||||
}
|
||||
inline void Type::_internal_set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) {
|
||||
inline void Type::_internal_set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value) {
|
||||
|
||||
syntax_ = value;
|
||||
}
|
||||
inline void Type::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) {
|
||||
inline void Type::set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value) {
|
||||
_internal_set_syntax(value);
|
||||
// @@protoc_insertion_point(field_set:google.protobuf.Type.syntax)
|
||||
}
|
||||
@ -1662,18 +1682,18 @@ inline void Type::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) {
|
||||
inline void Field::clear_kind() {
|
||||
kind_ = 0;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Field_Kind Field::_internal_kind() const {
|
||||
return static_cast< PROTOBUF_NAMESPACE_ID::Field_Kind >(kind_);
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Field_Kind Field::_internal_kind() const {
|
||||
return static_cast< ::PROTOBUF_NAMESPACE_ID::Field_Kind >(kind_);
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Field_Kind Field::kind() const {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Field_Kind Field::kind() const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.Field.kind)
|
||||
return _internal_kind();
|
||||
}
|
||||
inline void Field::_internal_set_kind(PROTOBUF_NAMESPACE_ID::Field_Kind value) {
|
||||
inline void Field::_internal_set_kind(::PROTOBUF_NAMESPACE_ID::Field_Kind value) {
|
||||
|
||||
kind_ = value;
|
||||
}
|
||||
inline void Field::set_kind(PROTOBUF_NAMESPACE_ID::Field_Kind value) {
|
||||
inline void Field::set_kind(::PROTOBUF_NAMESPACE_ID::Field_Kind value) {
|
||||
_internal_set_kind(value);
|
||||
// @@protoc_insertion_point(field_set:google.protobuf.Field.kind)
|
||||
}
|
||||
@ -1682,18 +1702,18 @@ inline void Field::set_kind(PROTOBUF_NAMESPACE_ID::Field_Kind value) {
|
||||
inline void Field::clear_cardinality() {
|
||||
cardinality_ = 0;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Field_Cardinality Field::_internal_cardinality() const {
|
||||
return static_cast< PROTOBUF_NAMESPACE_ID::Field_Cardinality >(cardinality_);
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Field_Cardinality Field::_internal_cardinality() const {
|
||||
return static_cast< ::PROTOBUF_NAMESPACE_ID::Field_Cardinality >(cardinality_);
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Field_Cardinality Field::cardinality() const {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Field_Cardinality Field::cardinality() const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.Field.cardinality)
|
||||
return _internal_cardinality();
|
||||
}
|
||||
inline void Field::_internal_set_cardinality(PROTOBUF_NAMESPACE_ID::Field_Cardinality value) {
|
||||
inline void Field::_internal_set_cardinality(::PROTOBUF_NAMESPACE_ID::Field_Cardinality value) {
|
||||
|
||||
cardinality_ = value;
|
||||
}
|
||||
inline void Field::set_cardinality(PROTOBUF_NAMESPACE_ID::Field_Cardinality value) {
|
||||
inline void Field::set_cardinality(::PROTOBUF_NAMESPACE_ID::Field_Cardinality value) {
|
||||
_internal_set_cardinality(value);
|
||||
// @@protoc_insertion_point(field_set:google.protobuf.Field.cardinality)
|
||||
}
|
||||
@ -1860,31 +1880,31 @@ inline int Field::options_size() const {
|
||||
inline void Field::clear_options() {
|
||||
options_.Clear();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Option* Field::mutable_options(int index) {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Option* Field::mutable_options(int index) {
|
||||
// @@protoc_insertion_point(field_mutable:google.protobuf.Field.options)
|
||||
return options_.Mutable(index);
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >*
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >*
|
||||
Field::mutable_options() {
|
||||
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Field.options)
|
||||
return &options_;
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Option& Field::_internal_options(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Option& Field::_internal_options(int index) const {
|
||||
return options_.Get(index);
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Option& Field::options(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Option& Field::options(int index) const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.Field.options)
|
||||
return _internal_options(index);
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Option* Field::_internal_add_options() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Option* Field::_internal_add_options() {
|
||||
return options_.Add();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Option* Field::add_options() {
|
||||
PROTOBUF_NAMESPACE_ID::Option* _add = _internal_add_options();
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Option* Field::add_options() {
|
||||
::PROTOBUF_NAMESPACE_ID::Option* _add = _internal_add_options();
|
||||
// @@protoc_insertion_point(field_add:google.protobuf.Field.options)
|
||||
return _add;
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >&
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >&
|
||||
Field::options() const {
|
||||
// @@protoc_insertion_point(field_list:google.protobuf.Field.options)
|
||||
return options_;
|
||||
@ -2042,31 +2062,31 @@ inline int Enum::enumvalue_size() const {
|
||||
inline void Enum::clear_enumvalue() {
|
||||
enumvalue_.Clear();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::EnumValue* Enum::mutable_enumvalue(int index) {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::EnumValue* Enum::mutable_enumvalue(int index) {
|
||||
// @@protoc_insertion_point(field_mutable:google.protobuf.Enum.enumvalue)
|
||||
return enumvalue_.Mutable(index);
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumValue >*
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumValue >*
|
||||
Enum::mutable_enumvalue() {
|
||||
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.enumvalue)
|
||||
return &enumvalue_;
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::EnumValue& Enum::_internal_enumvalue(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::EnumValue& Enum::_internal_enumvalue(int index) const {
|
||||
return enumvalue_.Get(index);
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::EnumValue& Enum::enumvalue(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::EnumValue& Enum::enumvalue(int index) const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.Enum.enumvalue)
|
||||
return _internal_enumvalue(index);
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::EnumValue* Enum::_internal_add_enumvalue() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::EnumValue* Enum::_internal_add_enumvalue() {
|
||||
return enumvalue_.Add();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::EnumValue* Enum::add_enumvalue() {
|
||||
PROTOBUF_NAMESPACE_ID::EnumValue* _add = _internal_add_enumvalue();
|
||||
inline ::PROTOBUF_NAMESPACE_ID::EnumValue* Enum::add_enumvalue() {
|
||||
::PROTOBUF_NAMESPACE_ID::EnumValue* _add = _internal_add_enumvalue();
|
||||
// @@protoc_insertion_point(field_add:google.protobuf.Enum.enumvalue)
|
||||
return _add;
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumValue >&
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumValue >&
|
||||
Enum::enumvalue() const {
|
||||
// @@protoc_insertion_point(field_list:google.protobuf.Enum.enumvalue)
|
||||
return enumvalue_;
|
||||
@ -2082,31 +2102,31 @@ inline int Enum::options_size() const {
|
||||
inline void Enum::clear_options() {
|
||||
options_.Clear();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Option* Enum::mutable_options(int index) {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Option* Enum::mutable_options(int index) {
|
||||
// @@protoc_insertion_point(field_mutable:google.protobuf.Enum.options)
|
||||
return options_.Mutable(index);
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >*
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >*
|
||||
Enum::mutable_options() {
|
||||
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.options)
|
||||
return &options_;
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Option& Enum::_internal_options(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Option& Enum::_internal_options(int index) const {
|
||||
return options_.Get(index);
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Option& Enum::options(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Option& Enum::options(int index) const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.Enum.options)
|
||||
return _internal_options(index);
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Option* Enum::_internal_add_options() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Option* Enum::_internal_add_options() {
|
||||
return options_.Add();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Option* Enum::add_options() {
|
||||
PROTOBUF_NAMESPACE_ID::Option* _add = _internal_add_options();
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Option* Enum::add_options() {
|
||||
::PROTOBUF_NAMESPACE_ID::Option* _add = _internal_add_options();
|
||||
// @@protoc_insertion_point(field_add:google.protobuf.Enum.options)
|
||||
return _add;
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >&
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >&
|
||||
Enum::options() const {
|
||||
// @@protoc_insertion_point(field_list:google.protobuf.Enum.options)
|
||||
return options_;
|
||||
@ -2119,17 +2139,17 @@ inline bool Enum::_internal_has_source_context() const {
|
||||
inline bool Enum::has_source_context() const {
|
||||
return _internal_has_source_context();
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::SourceContext& Enum::_internal_source_context() const {
|
||||
const PROTOBUF_NAMESPACE_ID::SourceContext* p = source_context_;
|
||||
return p != nullptr ? *p : reinterpret_cast<const PROTOBUF_NAMESPACE_ID::SourceContext&>(
|
||||
PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_);
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::SourceContext& Enum::_internal_source_context() const {
|
||||
const ::PROTOBUF_NAMESPACE_ID::SourceContext* p = source_context_;
|
||||
return p != nullptr ? *p : reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::SourceContext&>(
|
||||
::PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_);
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::SourceContext& Enum::source_context() const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::SourceContext& Enum::source_context() const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.Enum.source_context)
|
||||
return _internal_source_context();
|
||||
}
|
||||
inline void Enum::unsafe_arena_set_allocated_source_context(
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* source_context) {
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* source_context) {
|
||||
if (GetArenaForAllocation() == nullptr) {
|
||||
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context_);
|
||||
}
|
||||
@ -2141,9 +2161,9 @@ inline void Enum::unsafe_arena_set_allocated_source_context(
|
||||
}
|
||||
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Enum.source_context)
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::SourceContext* Enum::release_source_context() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Enum::release_source_context() {
|
||||
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* temp = source_context_;
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* temp = source_context_;
|
||||
source_context_ = nullptr;
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
|
||||
@ -2156,27 +2176,27 @@ inline PROTOBUF_NAMESPACE_ID::SourceContext* Enum::release_source_context() {
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||
return temp;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::SourceContext* Enum::unsafe_arena_release_source_context() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Enum::unsafe_arena_release_source_context() {
|
||||
// @@protoc_insertion_point(field_release:google.protobuf.Enum.source_context)
|
||||
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* temp = source_context_;
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* temp = source_context_;
|
||||
source_context_ = nullptr;
|
||||
return temp;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::SourceContext* Enum::_internal_mutable_source_context() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Enum::_internal_mutable_source_context() {
|
||||
|
||||
if (source_context_ == nullptr) {
|
||||
auto* p = CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::SourceContext>(GetArenaForAllocation());
|
||||
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::SourceContext>(GetArenaForAllocation());
|
||||
source_context_ = p;
|
||||
}
|
||||
return source_context_;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::SourceContext* Enum::mutable_source_context() {
|
||||
PROTOBUF_NAMESPACE_ID::SourceContext* _msg = _internal_mutable_source_context();
|
||||
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Enum::mutable_source_context() {
|
||||
::PROTOBUF_NAMESPACE_ID::SourceContext* _msg = _internal_mutable_source_context();
|
||||
// @@protoc_insertion_point(field_mutable:google.protobuf.Enum.source_context)
|
||||
return _msg;
|
||||
}
|
||||
inline void Enum::set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceContext* source_context) {
|
||||
inline void Enum::set_allocated_source_context(::PROTOBUF_NAMESPACE_ID::SourceContext* source_context) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context_);
|
||||
@ -2202,18 +2222,18 @@ inline void Enum::set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceCont
|
||||
inline void Enum::clear_syntax() {
|
||||
syntax_ = 0;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Syntax Enum::_internal_syntax() const {
|
||||
return static_cast< PROTOBUF_NAMESPACE_ID::Syntax >(syntax_);
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Syntax Enum::_internal_syntax() const {
|
||||
return static_cast< ::PROTOBUF_NAMESPACE_ID::Syntax >(syntax_);
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Syntax Enum::syntax() const {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Syntax Enum::syntax() const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.Enum.syntax)
|
||||
return _internal_syntax();
|
||||
}
|
||||
inline void Enum::_internal_set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) {
|
||||
inline void Enum::_internal_set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value) {
|
||||
|
||||
syntax_ = value;
|
||||
}
|
||||
inline void Enum::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) {
|
||||
inline void Enum::set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value) {
|
||||
_internal_set_syntax(value);
|
||||
// @@protoc_insertion_point(field_set:google.protobuf.Enum.syntax)
|
||||
}
|
||||
@ -2298,31 +2318,31 @@ inline int EnumValue::options_size() const {
|
||||
inline void EnumValue::clear_options() {
|
||||
options_.Clear();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Option* EnumValue::mutable_options(int index) {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Option* EnumValue::mutable_options(int index) {
|
||||
// @@protoc_insertion_point(field_mutable:google.protobuf.EnumValue.options)
|
||||
return options_.Mutable(index);
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >*
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >*
|
||||
EnumValue::mutable_options() {
|
||||
// @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumValue.options)
|
||||
return &options_;
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Option& EnumValue::_internal_options(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Option& EnumValue::_internal_options(int index) const {
|
||||
return options_.Get(index);
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Option& EnumValue::options(int index) const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Option& EnumValue::options(int index) const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.EnumValue.options)
|
||||
return _internal_options(index);
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Option* EnumValue::_internal_add_options() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Option* EnumValue::_internal_add_options() {
|
||||
return options_.Add();
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Option* EnumValue::add_options() {
|
||||
PROTOBUF_NAMESPACE_ID::Option* _add = _internal_add_options();
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Option* EnumValue::add_options() {
|
||||
::PROTOBUF_NAMESPACE_ID::Option* _add = _internal_add_options();
|
||||
// @@protoc_insertion_point(field_add:google.protobuf.EnumValue.options)
|
||||
return _add;
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >&
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >&
|
||||
EnumValue::options() const {
|
||||
// @@protoc_insertion_point(field_list:google.protobuf.EnumValue.options)
|
||||
return options_;
|
||||
@ -2385,17 +2405,17 @@ inline bool Option::_internal_has_value() const {
|
||||
inline bool Option::has_value() const {
|
||||
return _internal_has_value();
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Any& Option::_internal_value() const {
|
||||
const PROTOBUF_NAMESPACE_ID::Any* p = value_;
|
||||
return p != nullptr ? *p : reinterpret_cast<const PROTOBUF_NAMESPACE_ID::Any&>(
|
||||
PROTOBUF_NAMESPACE_ID::_Any_default_instance_);
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Any& Option::_internal_value() const {
|
||||
const ::PROTOBUF_NAMESPACE_ID::Any* p = value_;
|
||||
return p != nullptr ? *p : reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Any&>(
|
||||
::PROTOBUF_NAMESPACE_ID::_Any_default_instance_);
|
||||
}
|
||||
inline const PROTOBUF_NAMESPACE_ID::Any& Option::value() const {
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Any& Option::value() const {
|
||||
// @@protoc_insertion_point(field_get:google.protobuf.Option.value)
|
||||
return _internal_value();
|
||||
}
|
||||
inline void Option::unsafe_arena_set_allocated_value(
|
||||
PROTOBUF_NAMESPACE_ID::Any* value) {
|
||||
::PROTOBUF_NAMESPACE_ID::Any* value) {
|
||||
if (GetArenaForAllocation() == nullptr) {
|
||||
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(value_);
|
||||
}
|
||||
@ -2407,9 +2427,9 @@ inline void Option::unsafe_arena_set_allocated_value(
|
||||
}
|
||||
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Option.value)
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Any* Option::release_value() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Any* Option::release_value() {
|
||||
|
||||
PROTOBUF_NAMESPACE_ID::Any* temp = value_;
|
||||
::PROTOBUF_NAMESPACE_ID::Any* temp = value_;
|
||||
value_ = nullptr;
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
|
||||
@ -2422,27 +2442,27 @@ inline PROTOBUF_NAMESPACE_ID::Any* Option::release_value() {
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||
return temp;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Any* Option::unsafe_arena_release_value() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Any* Option::unsafe_arena_release_value() {
|
||||
// @@protoc_insertion_point(field_release:google.protobuf.Option.value)
|
||||
|
||||
PROTOBUF_NAMESPACE_ID::Any* temp = value_;
|
||||
::PROTOBUF_NAMESPACE_ID::Any* temp = value_;
|
||||
value_ = nullptr;
|
||||
return temp;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Any* Option::_internal_mutable_value() {
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Any* Option::_internal_mutable_value() {
|
||||
|
||||
if (value_ == nullptr) {
|
||||
auto* p = CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Any>(GetArenaForAllocation());
|
||||
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Any>(GetArenaForAllocation());
|
||||
value_ = p;
|
||||
}
|
||||
return value_;
|
||||
}
|
||||
inline PROTOBUF_NAMESPACE_ID::Any* Option::mutable_value() {
|
||||
PROTOBUF_NAMESPACE_ID::Any* _msg = _internal_mutable_value();
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Any* Option::mutable_value() {
|
||||
::PROTOBUF_NAMESPACE_ID::Any* _msg = _internal_mutable_value();
|
||||
// @@protoc_insertion_point(field_mutable:google.protobuf.Option.value)
|
||||
return _msg;
|
||||
}
|
||||
inline void Option::set_allocated_value(PROTOBUF_NAMESPACE_ID::Any* value) {
|
||||
inline void Option::set_allocated_value(::PROTOBUF_NAMESPACE_ID::Any* value) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(value_);
|
||||
@ -2482,20 +2502,20 @@ PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
|
||||
template <> struct is_proto_enum< PROTOBUF_NAMESPACE_ID::Field_Kind> : ::std::true_type {};
|
||||
template <> struct is_proto_enum< ::PROTOBUF_NAMESPACE_ID::Field_Kind> : ::std::true_type {};
|
||||
template <>
|
||||
inline const EnumDescriptor* GetEnumDescriptor< PROTOBUF_NAMESPACE_ID::Field_Kind>() {
|
||||
return PROTOBUF_NAMESPACE_ID::Field_Kind_descriptor();
|
||||
inline const EnumDescriptor* GetEnumDescriptor< ::PROTOBUF_NAMESPACE_ID::Field_Kind>() {
|
||||
return ::PROTOBUF_NAMESPACE_ID::Field_Kind_descriptor();
|
||||
}
|
||||
template <> struct is_proto_enum< PROTOBUF_NAMESPACE_ID::Field_Cardinality> : ::std::true_type {};
|
||||
template <> struct is_proto_enum< ::PROTOBUF_NAMESPACE_ID::Field_Cardinality> : ::std::true_type {};
|
||||
template <>
|
||||
inline const EnumDescriptor* GetEnumDescriptor< PROTOBUF_NAMESPACE_ID::Field_Cardinality>() {
|
||||
return PROTOBUF_NAMESPACE_ID::Field_Cardinality_descriptor();
|
||||
inline const EnumDescriptor* GetEnumDescriptor< ::PROTOBUF_NAMESPACE_ID::Field_Cardinality>() {
|
||||
return ::PROTOBUF_NAMESPACE_ID::Field_Cardinality_descriptor();
|
||||
}
|
||||
template <> struct is_proto_enum< PROTOBUF_NAMESPACE_ID::Syntax> : ::std::true_type {};
|
||||
template <> struct is_proto_enum< ::PROTOBUF_NAMESPACE_ID::Syntax> : ::std::true_type {};
|
||||
template <>
|
||||
inline const EnumDescriptor* GetEnumDescriptor< PROTOBUF_NAMESPACE_ID::Syntax>() {
|
||||
return PROTOBUF_NAMESPACE_ID::Syntax_descriptor();
|
||||
inline const EnumDescriptor* GetEnumDescriptor< ::PROTOBUF_NAMESPACE_ID::Syntax>() {
|
||||
return ::PROTOBUF_NAMESPACE_ID::Syntax_descriptor();
|
||||
}
|
||||
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
@ -343,10 +343,6 @@ util::Status JsonStreamParser::ParseValue(TokenType type) {
|
||||
case UNKNOWN:
|
||||
return ReportUnknown("Expected a value.", ParseErrorType::EXPECTED_VALUE);
|
||||
default: {
|
||||
if (allow_empty_null_ && IsEmptyNullAllowed(type)) {
|
||||
return ParseEmptyNull();
|
||||
}
|
||||
|
||||
// Special case for having been cut off while parsing, wait for more data.
|
||||
// This handles things like 'fals' being at the end of the string, we
|
||||
// don't know if the next char would be e, completing it, or something
|
||||
@ -354,6 +350,10 @@ util::Status JsonStreamParser::ParseValue(TokenType type) {
|
||||
if (!finishing_ && p_.length() < kKeywordFalse.length()) {
|
||||
return util::CancelledError("");
|
||||
}
|
||||
|
||||
if (allow_empty_null_ && IsEmptyNullAllowed(type)) {
|
||||
return ParseEmptyNull();
|
||||
}
|
||||
return ReportFailure("Unexpected token.",
|
||||
ParseErrorType::UNEXPECTED_TOKEN);
|
||||
}
|
||||
|
@ -132,91 +132,91 @@ static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_s
|
||||
|
||||
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fwrappers_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DoubleValue, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DoubleValue, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DoubleValue, value_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DoubleValue, value_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FloatValue, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FloatValue, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FloatValue, value_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FloatValue, value_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Int64Value, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Int64Value, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Int64Value, value_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Int64Value, value_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UInt64Value, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UInt64Value, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UInt64Value, value_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UInt64Value, value_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Int32Value, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Int32Value, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Int32Value, value_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Int32Value, value_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UInt32Value, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UInt32Value, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UInt32Value, value_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UInt32Value, value_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::BoolValue, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::BoolValue, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::BoolValue, value_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::BoolValue, value_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::StringValue, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::StringValue, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::StringValue, value_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::StringValue, value_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::BytesValue, _internal_metadata_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::BytesValue, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::BytesValue, value_),
|
||||
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::BytesValue, value_),
|
||||
};
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
{ 0, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::DoubleValue)},
|
||||
{ 7, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::FloatValue)},
|
||||
{ 14, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::Int64Value)},
|
||||
{ 21, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::UInt64Value)},
|
||||
{ 28, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::Int32Value)},
|
||||
{ 35, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::UInt32Value)},
|
||||
{ 42, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::BoolValue)},
|
||||
{ 49, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::StringValue)},
|
||||
{ 56, -1, -1, sizeof(PROTOBUF_NAMESPACE_ID::BytesValue)},
|
||||
{ 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::DoubleValue)},
|
||||
{ 7, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::FloatValue)},
|
||||
{ 14, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Int64Value)},
|
||||
{ 21, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::UInt64Value)},
|
||||
{ 28, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Int32Value)},
|
||||
{ 35, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::UInt32Value)},
|
||||
{ 42, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::BoolValue)},
|
||||
{ 49, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::StringValue)},
|
||||
{ 56, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::BytesValue)},
|
||||
};
|
||||
|
||||
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_DoubleValue_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_FloatValue_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Int64Value_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_UInt64Value_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Int32Value_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_UInt32Value_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_BoolValue_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_StringValue_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_BytesValue_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_DoubleValue_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_FloatValue_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_Int64Value_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_UInt64Value_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_Int32Value_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_UInt32Value_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_BoolValue_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_StringValue_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::PROTOBUF_NAMESPACE_ID::_BytesValue_default_instance_),
|
||||
};
|
||||
|
||||
const char descriptor_table_protodef_google_2fprotobuf_2fwrappers_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
||||
@ -1886,32 +1886,32 @@ void BytesValue::InternalSwap(BytesValue* other) {
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::DoubleValue* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::DoubleValue >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::DoubleValue >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::DoubleValue* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::DoubleValue >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::DoubleValue >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::FloatValue* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::FloatValue >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::FloatValue >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::FloatValue* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::FloatValue >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::FloatValue >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Int64Value* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Int64Value >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Int64Value >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Int64Value* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Int64Value >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Int64Value >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::UInt64Value* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::UInt64Value >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::UInt64Value >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::UInt64Value* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::UInt64Value >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::UInt64Value >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Int32Value* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Int32Value >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Int32Value >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Int32Value* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Int32Value >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Int32Value >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::UInt32Value* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::UInt32Value >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::UInt32Value >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::UInt32Value* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::UInt32Value >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::UInt32Value >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::BoolValue* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::BoolValue >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::BoolValue >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::BoolValue* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::BoolValue >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::BoolValue >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::StringValue* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::StringValue >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::StringValue >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::StringValue* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::StringValue >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::StringValue >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::BytesValue* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::BytesValue >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::BytesValue >(arena);
|
||||
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::BytesValue* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::BytesValue >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::BytesValue >(arena);
|
||||
}
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
|
@ -83,15 +83,15 @@ struct UInt64ValueDefaultTypeInternal;
|
||||
PROTOBUF_EXPORT extern UInt64ValueDefaultTypeInternal _UInt64Value_default_instance_;
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::BoolValue* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::BoolValue>(Arena*);
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::BytesValue* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::BytesValue>(Arena*);
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::DoubleValue* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::DoubleValue>(Arena*);
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::FloatValue* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::FloatValue>(Arena*);
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Int32Value* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Int32Value>(Arena*);
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Int64Value* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Int64Value>(Arena*);
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::StringValue* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::StringValue>(Arena*);
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::UInt32Value* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::UInt32Value>(Arena*);
|
||||
template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::UInt64Value* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::UInt64Value>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::BoolValue* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::BoolValue>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::BytesValue* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::BytesValue>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::DoubleValue* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::DoubleValue>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::FloatValue* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::FloatValue>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::Int32Value* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Int32Value>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::Int64Value* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Int64Value>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::StringValue* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::StringValue>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::UInt32Value* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::UInt32Value>(Arena*);
|
||||
template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::UInt64Value* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::UInt64Value>(Arena*);
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
|
||||
@ -116,7 +116,11 @@ class PROTOBUF_EXPORT DoubleValue final :
|
||||
}
|
||||
inline DoubleValue& operator=(DoubleValue&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
@ -255,7 +259,11 @@ class PROTOBUF_EXPORT FloatValue final :
|
||||
}
|
||||
inline FloatValue& operator=(FloatValue&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
@ -394,7 +402,11 @@ class PROTOBUF_EXPORT Int64Value final :
|
||||
}
|
||||
inline Int64Value& operator=(Int64Value&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
@ -533,7 +545,11 @@ class PROTOBUF_EXPORT UInt64Value final :
|
||||
}
|
||||
inline UInt64Value& operator=(UInt64Value&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
@ -672,7 +688,11 @@ class PROTOBUF_EXPORT Int32Value final :
|
||||
}
|
||||
inline Int32Value& operator=(Int32Value&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
@ -811,7 +831,11 @@ class PROTOBUF_EXPORT UInt32Value final :
|
||||
}
|
||||
inline UInt32Value& operator=(UInt32Value&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
@ -950,7 +974,11 @@ class PROTOBUF_EXPORT BoolValue final :
|
||||
}
|
||||
inline BoolValue& operator=(BoolValue&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
@ -1089,7 +1117,11 @@ class PROTOBUF_EXPORT StringValue final :
|
||||
}
|
||||
inline StringValue& operator=(StringValue&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
@ -1233,7 +1265,11 @@ class PROTOBUF_EXPORT BytesValue final :
|
||||
}
|
||||
inline BytesValue& operator=(BytesValue&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()) {
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
|
25
third_party/wyhash/LICENSE
vendored
25
third_party/wyhash/LICENSE
vendored
@ -1,25 +0,0 @@
|
||||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
distribute this software, either in source code form or as a compiled
|
||||
binary, for any purpose, commercial or non-commercial, and by any
|
||||
means.
|
||||
|
||||
In jurisdictions that recognize copyright laws, the author or authors
|
||||
of this software dedicate any and all copyright interest in the
|
||||
software to the public domain. We make this dedication for the benefit
|
||||
of the public at large and to the detriment of our heirs and
|
||||
successors. We intend this dedication to be an overt act of
|
||||
relinquishment in perpetuity of all present and future rights to this
|
||||
software under copyright law.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
For more information, please refer to <http://unlicense.org/>
|
||||
|
145
third_party/wyhash/wyhash.h
vendored
145
third_party/wyhash/wyhash.h
vendored
@ -1,145 +0,0 @@
|
||||
/* Copyright 2020 王一 Wang Yi <godspeed_china@yeah.net>
|
||||
This is free and unencumbered software released into the public domain. http://unlicense.org/
|
||||
See github.com/wangyi-fudan/wyhash/ LICENSE
|
||||
*/
|
||||
#ifndef wyhash_final_version
|
||||
#define wyhash_final_version
|
||||
//defines that change behavior
|
||||
#ifndef WYHASH_CONDOM
|
||||
#define WYHASH_CONDOM 1 //0: read 8 bytes before and after boundaries, dangerous but fastest. 1: normal valid behavior 2: extra protection against entropy loss (probability=2^-63), aka. "blind multiplication"
|
||||
#endif
|
||||
#define WYHASH_32BIT_MUM 0 //faster on 32 bit system
|
||||
//includes
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#if defined(_MSC_VER) && defined(_M_X64)
|
||||
#include <intrin.h>
|
||||
#pragma intrinsic(_umul128)
|
||||
#endif
|
||||
#if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__clang__)
|
||||
#define _likely_(x) __builtin_expect(x,1)
|
||||
#define _unlikely_(x) __builtin_expect(x,0)
|
||||
#else
|
||||
#define _likely_(x) (x)
|
||||
#define _unlikely_(x) (x)
|
||||
#endif
|
||||
//mum function
|
||||
static inline uint64_t _wyrot(uint64_t x) { return (x>>32)|(x<<32); }
|
||||
static inline void _wymum(uint64_t *A, uint64_t *B){
|
||||
#if(WYHASH_32BIT_MUM)
|
||||
uint64_t hh=(*A>>32)*(*B>>32), hl=(*A>>32)*(unsigned)*B, lh=(unsigned)*A*(*B>>32), ll=(uint64_t)(unsigned)*A*(unsigned)*B;
|
||||
#if(WYHASH_CONDOM>1)
|
||||
*A^=_wyrot(hl)^hh; *B^=_wyrot(lh)^ll;
|
||||
#else
|
||||
*A=_wyrot(hl)^hh; *B=_wyrot(lh)^ll;
|
||||
#endif
|
||||
#elif defined(__SIZEOF_INT128__)
|
||||
__uint128_t r=*A; r*=*B;
|
||||
#if(WYHASH_CONDOM>1)
|
||||
*A^=(uint64_t)r; *B^=(uint64_t)(r>>64);
|
||||
#else
|
||||
*A=(uint64_t)r; *B=(uint64_t)(r>>64);
|
||||
#endif
|
||||
#elif defined(_MSC_VER) && defined(_M_X64)
|
||||
#if(WYHASH_CONDOM>1)
|
||||
uint64_t a, b;
|
||||
a=_umul128(*A,*B,&b);
|
||||
*A^=a; *B^=b;
|
||||
#else
|
||||
*A=_umul128(*A,*B,B);
|
||||
#endif
|
||||
#else
|
||||
uint64_t ha=*A>>32, hb=*B>>32, la=(uint32_t)*A, lb=(uint32_t)*B, hi, lo;
|
||||
uint64_t rh=ha*hb, rm0=ha*lb, rm1=hb*la, rl=la*lb, t=rl+(rm0<<32), c=t<rl;
|
||||
lo=t+(rm1<<32); c+=lo<t; hi=rh+(rm0>>32)+(rm1>>32)+c;
|
||||
#if(WYHASH_CONDOM>1)
|
||||
*A^=lo; *B^=hi;
|
||||
#else
|
||||
*A=lo; *B=hi;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
static inline uint64_t _wymix(uint64_t A, uint64_t B){ _wymum(&A,&B); return A^B; }
|
||||
//read functions
|
||||
#ifndef WYHASH_LITTLE_ENDIAN
|
||||
#if defined(_WIN32) || defined(__LITTLE_ENDIAN__) || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
|
||||
#define WYHASH_LITTLE_ENDIAN 1
|
||||
#elif defined(__BIG_ENDIAN__) || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
|
||||
#define WYHASH_LITTLE_ENDIAN 0
|
||||
#endif
|
||||
#endif
|
||||
#if (WYHASH_LITTLE_ENDIAN)
|
||||
static inline uint64_t _wyr8(const uint8_t *p) { uint64_t v; memcpy(&v, p, 8); return v;}
|
||||
static inline uint64_t _wyr4(const uint8_t *p) { unsigned v; memcpy(&v, p, 4); return v;}
|
||||
#elif defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__clang__)
|
||||
static inline uint64_t _wyr8(const uint8_t *p) { uint64_t v; memcpy(&v, p, 8); return __builtin_bswap64(v);}
|
||||
static inline uint64_t _wyr4(const uint8_t *p) { unsigned v; memcpy(&v, p, 4); return __builtin_bswap32(v);}
|
||||
#elif defined(_MSC_VER)
|
||||
static inline uint64_t _wyr8(const uint8_t *p) { uint64_t v; memcpy(&v, p, 8); return _byteswap_uint64(v);}
|
||||
static inline uint64_t _wyr4(const uint8_t *p) { unsigned v; memcpy(&v, p, 4); return _byteswap_ulong(v);}
|
||||
#endif
|
||||
static inline uint64_t _wyr3(const uint8_t *p, unsigned k) { return (((uint64_t)p[0])<<16)|(((uint64_t)p[k>>1])<<8)|p[k-1];}
|
||||
//wyhash function
|
||||
static inline uint64_t _wyfinish16(const uint8_t *p, uint64_t len, uint64_t seed, const uint64_t *secret, uint64_t i){
|
||||
#if(WYHASH_CONDOM>0)
|
||||
uint64_t a, b;
|
||||
if(_likely_(i<=8)){
|
||||
if(_likely_(i>=4)){ a=_wyr4(p); b=_wyr4(p+i-4); }
|
||||
else if (_likely_(i)){ a=_wyr3(p,i); b=0; }
|
||||
else a=b=0;
|
||||
}
|
||||
else{ a=_wyr8(p); b=_wyr8(p+i-8); }
|
||||
return _wymix(secret[1]^len,_wymix(a^secret[1], b^seed));
|
||||
#else
|
||||
#define oneshot_shift ((i<8)*((8-i)<<3))
|
||||
return _wymix(secret[1]^len,_wymix((_wyr8(p)<<oneshot_shift)^secret[1],(_wyr8(p+i-8)>>oneshot_shift)^seed));
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline uint64_t _wyfinish(const uint8_t *p, uint64_t len, uint64_t seed, const uint64_t *secret, uint64_t i){
|
||||
if(_likely_(i<=16)) return _wyfinish16(p,len,seed,secret,i);
|
||||
return _wyfinish(p+16,len,_wymix(_wyr8(p)^secret[1],_wyr8(p+8)^seed),secret,i-16);
|
||||
}
|
||||
|
||||
static inline uint64_t wyhash(const void *key, uint64_t len, uint64_t seed, const uint64_t *secret){
|
||||
const uint8_t *p=(const uint8_t *)key;
|
||||
uint64_t i=len; seed^=*secret;
|
||||
if(_unlikely_(i>64)){
|
||||
uint64_t see1=seed;
|
||||
do{
|
||||
seed=_wymix(_wyr8(p)^secret[1],_wyr8(p+8)^seed)^_wymix(_wyr8(p+16)^secret[2],_wyr8(p+24)^seed);
|
||||
see1=_wymix(_wyr8(p+32)^secret[3],_wyr8(p+40)^see1)^_wymix(_wyr8(p+48)^secret[4],_wyr8(p+56)^see1);
|
||||
p+=64; i-=64;
|
||||
}while(i>64);
|
||||
seed^=see1;
|
||||
}
|
||||
return _wyfinish(p,len,seed,secret,i);
|
||||
}
|
||||
//utility functions
|
||||
static const uint64_t _wyp[5] = {0xa0761d6478bd642full, 0xe7037ed1a0b428dbull, 0x8ebc6af09c88c6e3ull, 0x589965cc75374cc3ull, 0x1d8e4e27c47d124full};
|
||||
static inline uint64_t wyhash64(uint64_t A, uint64_t B){ A^=_wyp[0]; B^=_wyp[1]; _wymum(&A,&B); return _wymix(A^_wyp[0],B^_wyp[1]);}
|
||||
static inline uint64_t wyrand(uint64_t *seed){ *seed+=_wyp[0]; return _wymix(*seed,*seed^_wyp[1]);}
|
||||
static inline double wy2u01(uint64_t r){ const double _wynorm=1.0/(1ull<<52); return (r>>12)*_wynorm;}
|
||||
static inline double wy2gau(uint64_t r){ const double _wynorm=1.0/(1ull<<20); return ((r&0x1fffff)+((r>>21)&0x1fffff)+((r>>42)&0x1fffff))*_wynorm-3.0;}
|
||||
static inline uint64_t wy2u0k(uint64_t r, uint64_t k){ _wymum(&r,&k); return k; }
|
||||
|
||||
static inline void make_secret(uint64_t seed, uint64_t *secret){
|
||||
uint8_t c[] = {15, 23, 27, 29, 30, 39, 43, 45, 46, 51, 53, 54, 57, 58, 60, 71, 75, 77, 78, 83, 85, 86, 89, 90, 92, 99, 101, 102, 105, 106, 108, 113, 114, 116, 120, 135, 139, 141, 142, 147, 149, 150, 153, 154, 156, 163, 165, 166, 169, 170, 172, 177, 178, 180, 184, 195, 197, 198, 201, 202, 204, 209, 210, 212, 216, 225, 226, 228, 232, 240 };
|
||||
for(size_t i=0;i<5;i++){
|
||||
uint8_t ok;
|
||||
do{
|
||||
ok=1; secret[i]=0;
|
||||
for(size_t j=0;j<64;j+=8) secret[i]|=((uint64_t)c[wyrand(&seed)%sizeof(c)])<<j;
|
||||
if(secret[i]%2==0){ ok=0; continue; }
|
||||
for(size_t j=0;j<i;j++)
|
||||
#if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__clang__)
|
||||
if(__builtin_popcountll(secret[j]^secret[i])!=32){ ok=0; break; }
|
||||
#elif defined(_MSC_VER) && defined(_M_X64)
|
||||
if(_mm_popcnt_u64(secret[j]^secret[i])!=32){ ok=0; break; }
|
||||
#endif
|
||||
if(!ok)continue;
|
||||
for(uint64_t j=3;j<0x100000000ull;j+=2) if(secret[i]%j==0){ ok=0; break; }
|
||||
}while(!ok);
|
||||
}
|
||||
}
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user