Fix bugs on windows

pull/734/head
Bo Yang 10 years ago
parent 839b180dba
commit ff7bdad231
  1. 12
      BUILD
  2. 7
      Makefile.am
  3. 1
      cmake/libprotobuf-lite.cmake
  4. 1
      cmake/libprotobuf.cmake
  5. 1
      cmake/tests.cmake
  6. 14
      src/google/protobuf/any.pb.cc
  7. 178
      src/google/protobuf/api.pb.cc
  8. 56
      src/google/protobuf/api.pb.h
  9. 3
      src/google/protobuf/arena.h
  10. 4
      src/google/protobuf/compiler/cpp/cpp_unittest.cc
  11. 14
      src/google/protobuf/field_mask.pb.cc
  12. 4
      src/google/protobuf/generated_message_reflection.h
  13. 25
      src/google/protobuf/map.h
  14. 4
      src/google/protobuf/map_entry_lite.h
  15. 14
      src/google/protobuf/map_field.cc
  16. 4
      src/google/protobuf/map_field_inl.h
  17. 14
      src/google/protobuf/source_context.pb.cc
  18. 63
      src/google/protobuf/struct.pb.cc
  19. 22
      src/google/protobuf/struct.pb.h
  20. 18
      src/google/protobuf/stubs/hash.h
  21. 10
      src/google/protobuf/stubs/int128.h
  22. 16
      src/google/protobuf/stubs/mathutil.h
  23. 1
      src/google/protobuf/stubs/status.cc
  24. 244
      src/google/protobuf/type.pb.cc
  25. 88
      src/google/protobuf/type.pb.h
  26. 14
      src/google/protobuf/util/internal/datapiece.h
  27. 2
      src/google/protobuf/util/internal/default_value_objectwriter.h
  28. 9
      src/google/protobuf/util/internal/json_objectwriter.cc
  29. 2
      src/google/protobuf/util/internal/type_info.h
  30. 2
      src/google/protobuf/util/internal/utility.cc
  31. 4
      src/google/protobuf/util/json_util.h
  32. 31
      src/google/protobuf/util/time_util.h
  33. 2
      src/google/protobuf/util/type_resolver_util.h
  34. 14
      src/google/protobuf/wrappers.pb.cc
  35. 10
      src/google/protobuf/wrappers.pb.h
  36. 7
      update_file_lists.sh

12
BUILD

@ -35,11 +35,13 @@ cc_library(
"src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc", "src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc",
"src/google/protobuf/stubs/bytestream.cc", "src/google/protobuf/stubs/bytestream.cc",
"src/google/protobuf/stubs/common.cc", "src/google/protobuf/stubs/common.cc",
"src/google/protobuf/stubs/int128.cc",
"src/google/protobuf/stubs/once.cc", "src/google/protobuf/stubs/once.cc",
"src/google/protobuf/stubs/status.cc", "src/google/protobuf/stubs/status.cc",
"src/google/protobuf/stubs/statusor.cc", "src/google/protobuf/stubs/statusor.cc",
"src/google/protobuf/stubs/stringpiece.cc", "src/google/protobuf/stubs/stringpiece.cc",
"src/google/protobuf/stubs/stringprintf.cc", "src/google/protobuf/stubs/stringprintf.cc",
"src/google/protobuf/stubs/structurally_valid.cc",
"src/google/protobuf/stubs/strutil.cc", "src/google/protobuf/stubs/strutil.cc",
"src/google/protobuf/stubs/time.cc", "src/google/protobuf/stubs/time.cc",
"src/google/protobuf/wire_format_lite.cc", "src/google/protobuf/wire_format_lite.cc",
@ -80,13 +82,13 @@ cc_library(
"src/google/protobuf/source_context.pb.cc", "src/google/protobuf/source_context.pb.cc",
"src/google/protobuf/struct.pb.cc", "src/google/protobuf/struct.pb.cc",
"src/google/protobuf/stubs/mathlimits.cc", "src/google/protobuf/stubs/mathlimits.cc",
"src/google/protobuf/stubs/structurally_valid.cc",
"src/google/protobuf/stubs/substitute.cc", "src/google/protobuf/stubs/substitute.cc",
"src/google/protobuf/text_format.cc", "src/google/protobuf/text_format.cc",
"src/google/protobuf/timestamp.pb.cc", "src/google/protobuf/timestamp.pb.cc",
"src/google/protobuf/type.pb.cc", "src/google/protobuf/type.pb.cc",
"src/google/protobuf/unknown_field_set.cc", "src/google/protobuf/unknown_field_set.cc",
"src/google/protobuf/util/field_comparator.cc", "src/google/protobuf/util/field_comparator.cc",
"src/google/protobuf/util/field_mask_util.cc",
"src/google/protobuf/util/internal/datapiece.cc", "src/google/protobuf/util/internal/datapiece.cc",
"src/google/protobuf/util/internal/default_value_objectwriter.cc", "src/google/protobuf/util/internal/default_value_objectwriter.cc",
"src/google/protobuf/util/internal/error_listener.cc", "src/google/protobuf/util/internal/error_listener.cc",
@ -102,6 +104,7 @@ cc_library(
"src/google/protobuf/util/internal/utility.cc", "src/google/protobuf/util/internal/utility.cc",
"src/google/protobuf/util/json_util.cc", "src/google/protobuf/util/json_util.cc",
"src/google/protobuf/util/message_differencer.cc", "src/google/protobuf/util/message_differencer.cc",
"src/google/protobuf/util/time_util.cc",
"src/google/protobuf/util/type_resolver_util.cc", "src/google/protobuf/util/type_resolver_util.cc",
"src/google/protobuf/wire_format.cc", "src/google/protobuf/wire_format.cc",
"src/google/protobuf/wrappers.pb.cc", "src/google/protobuf/wrappers.pb.cc",
@ -180,6 +183,7 @@ cc_library(
"src/google/protobuf/compiler/java/java_enum.cc", "src/google/protobuf/compiler/java/java_enum.cc",
"src/google/protobuf/compiler/java/java_enum_field.cc", "src/google/protobuf/compiler/java/java_enum_field.cc",
"src/google/protobuf/compiler/java/java_enum_field_lite.cc", "src/google/protobuf/compiler/java/java_enum_field_lite.cc",
"src/google/protobuf/compiler/java/java_enum_lite.cc",
"src/google/protobuf/compiler/java/java_extension.cc", "src/google/protobuf/compiler/java/java_extension.cc",
"src/google/protobuf/compiler/java/java_field.cc", "src/google/protobuf/compiler/java/java_field.cc",
"src/google/protobuf/compiler/java/java_file.cc", "src/google/protobuf/compiler/java/java_file.cc",
@ -258,6 +262,7 @@ LITE_TEST_PROTOS = [
"google/protobuf/unittest_import_lite.proto", "google/protobuf/unittest_import_lite.proto",
"google/protobuf/unittest_import_public_lite.proto", "google/protobuf/unittest_import_public_lite.proto",
"google/protobuf/unittest_lite.proto", "google/protobuf/unittest_lite.proto",
"google/protobuf/unittest_no_arena_lite.proto",
] ]
TEST_PROTOS = [ TEST_PROTOS = [
@ -278,6 +283,7 @@ TEST_PROTOS = [
"google/protobuf/unittest_import_public.proto", "google/protobuf/unittest_import_public.proto",
"google/protobuf/unittest_lite_imports_nonlite.proto", "google/protobuf/unittest_lite_imports_nonlite.proto",
"google/protobuf/unittest_mset.proto", "google/protobuf/unittest_mset.proto",
"google/protobuf/unittest_mset_wire_format.proto",
"google/protobuf/unittest_no_arena.proto", "google/protobuf/unittest_no_arena.proto",
"google/protobuf/unittest_no_arena_import.proto", "google/protobuf/unittest_no_arena_import.proto",
"google/protobuf/unittest_no_field_presence.proto", "google/protobuf/unittest_no_field_presence.proto",
@ -293,6 +299,7 @@ TEST_PROTOS = [
"google/protobuf/util/internal/testdata/default_value_test.proto", "google/protobuf/util/internal/testdata/default_value_test.proto",
"google/protobuf/util/internal/testdata/field_mask.proto", "google/protobuf/util/internal/testdata/field_mask.proto",
"google/protobuf/util/internal/testdata/maps.proto", "google/protobuf/util/internal/testdata/maps.proto",
"google/protobuf/util/internal/testdata/oneofs.proto",
"google/protobuf/util/internal/testdata/struct.proto", "google/protobuf/util/internal/testdata/struct.proto",
"google/protobuf/util/internal/testdata/timestamp_duration.proto", "google/protobuf/util/internal/testdata/timestamp_duration.proto",
"google/protobuf/util/json_format_proto3.proto", "google/protobuf/util/json_format_proto3.proto",
@ -381,6 +388,7 @@ cc_test(
"src/google/protobuf/repeated_field_unittest.cc", "src/google/protobuf/repeated_field_unittest.cc",
"src/google/protobuf/stubs/bytestream_unittest.cc", "src/google/protobuf/stubs/bytestream_unittest.cc",
"src/google/protobuf/stubs/common_unittest.cc", "src/google/protobuf/stubs/common_unittest.cc",
"src/google/protobuf/stubs/int128_unittest.cc",
"src/google/protobuf/stubs/once_unittest.cc", "src/google/protobuf/stubs/once_unittest.cc",
"src/google/protobuf/stubs/status_test.cc", "src/google/protobuf/stubs/status_test.cc",
"src/google/protobuf/stubs/statusor_test.cc", "src/google/protobuf/stubs/statusor_test.cc",
@ -394,6 +402,7 @@ cc_test(
"src/google/protobuf/text_format_unittest.cc", "src/google/protobuf/text_format_unittest.cc",
"src/google/protobuf/unknown_field_set_unittest.cc", "src/google/protobuf/unknown_field_set_unittest.cc",
"src/google/protobuf/util/field_comparator_test.cc", "src/google/protobuf/util/field_comparator_test.cc",
"src/google/protobuf/util/field_mask_util_test.cc",
"src/google/protobuf/util/internal/default_value_objectwriter_test.cc", "src/google/protobuf/util/internal/default_value_objectwriter_test.cc",
"src/google/protobuf/util/internal/json_objectwriter_test.cc", "src/google/protobuf/util/internal/json_objectwriter_test.cc",
"src/google/protobuf/util/internal/json_stream_parser_test.cc", "src/google/protobuf/util/internal/json_stream_parser_test.cc",
@ -401,6 +410,7 @@ cc_test(
"src/google/protobuf/util/internal/protostream_objectwriter_test.cc", "src/google/protobuf/util/internal/protostream_objectwriter_test.cc",
"src/google/protobuf/util/internal/type_info_test_helper.cc", "src/google/protobuf/util/internal/type_info_test_helper.cc",
"src/google/protobuf/util/json_util_test.cc", "src/google/protobuf/util/json_util_test.cc",
"src/google/protobuf/util/time_util_test.cc",
"src/google/protobuf/util/type_resolver_util_test.cc", "src/google/protobuf/util/type_resolver_util_test.cc",
"src/google/protobuf/well_known_types_unittest.cc", "src/google/protobuf/well_known_types_unittest.cc",
"src/google/protobuf/wire_format_unittest.cc", "src/google/protobuf/wire_format_unittest.cc",

@ -604,11 +604,16 @@ EXTRA_DIST = $(@DIST_LANG@_EXTRA_DIST) \
CHANGES.txt \ CHANGES.txt \
update_file_lists.sh \ update_file_lists.sh \
cmake/CMakeLists.txt \ cmake/CMakeLists.txt \
cmake/README.md \
cmake/extract_includes.bat.in \
cmake/install.cmake \
cmake/libprotobuf.cmake \ cmake/libprotobuf.cmake \
cmake/libprotobuf-lite.cmake \ cmake/libprotobuf-lite.cmake \
cmake/libprotoc.cmake \ cmake/libprotoc.cmake \
cmake/protobuf-config-version.cmake.in \
cmake/protobuf-config.cmake.in \
cmake/protobuf-module.cmake.in \
cmake/protoc.cmake \ cmake/protoc.cmake \
cmake/README.md \
cmake/tests.cmake \ cmake/tests.cmake \
editors/README.txt \ editors/README.txt \
editors/proto.vim \ editors/proto.vim \

@ -18,6 +18,7 @@ set(libprotobuf_lite_files
${protobuf_source_dir}/src/google/protobuf/stubs/statusor.cc ${protobuf_source_dir}/src/google/protobuf/stubs/statusor.cc
${protobuf_source_dir}/src/google/protobuf/stubs/stringpiece.cc ${protobuf_source_dir}/src/google/protobuf/stubs/stringpiece.cc
${protobuf_source_dir}/src/google/protobuf/stubs/stringprintf.cc ${protobuf_source_dir}/src/google/protobuf/stubs/stringprintf.cc
${protobuf_source_dir}/src/google/protobuf/stubs/structurally_valid.cc
${protobuf_source_dir}/src/google/protobuf/stubs/strutil.cc ${protobuf_source_dir}/src/google/protobuf/stubs/strutil.cc
${protobuf_source_dir}/src/google/protobuf/stubs/time.cc ${protobuf_source_dir}/src/google/protobuf/stubs/time.cc
${protobuf_source_dir}/src/google/protobuf/wire_format_lite.cc ${protobuf_source_dir}/src/google/protobuf/wire_format_lite.cc

@ -25,7 +25,6 @@ set(libprotobuf_files
${protobuf_source_dir}/src/google/protobuf/source_context.pb.cc ${protobuf_source_dir}/src/google/protobuf/source_context.pb.cc
${protobuf_source_dir}/src/google/protobuf/struct.pb.cc ${protobuf_source_dir}/src/google/protobuf/struct.pb.cc
${protobuf_source_dir}/src/google/protobuf/stubs/mathlimits.cc ${protobuf_source_dir}/src/google/protobuf/stubs/mathlimits.cc
${protobuf_source_dir}/src/google/protobuf/stubs/structurally_valid.cc
${protobuf_source_dir}/src/google/protobuf/stubs/substitute.cc ${protobuf_source_dir}/src/google/protobuf/stubs/substitute.cc
${protobuf_source_dir}/src/google/protobuf/text_format.cc ${protobuf_source_dir}/src/google/protobuf/text_format.cc
${protobuf_source_dir}/src/google/protobuf/timestamp.pb.cc ${protobuf_source_dir}/src/google/protobuf/timestamp.pb.cc

@ -36,7 +36,6 @@ set(tests_protos
google/protobuf/unittest_drop_unknown_fields.proto google/protobuf/unittest_drop_unknown_fields.proto
google/protobuf/unittest_embed_optimize_for.proto google/protobuf/unittest_embed_optimize_for.proto
google/protobuf/unittest_empty.proto google/protobuf/unittest_empty.proto
google/protobuf/unittest_enormous_descriptor.proto
google/protobuf/unittest_import.proto google/protobuf/unittest_import.proto
google/protobuf/unittest_import_public.proto google/protobuf/unittest_import_public.proto
google/protobuf/unittest_lite_imports_nonlite.proto google/protobuf/unittest_lite_imports_nonlite.proto

@ -208,10 +208,10 @@ bool Any::MergePartialFromCodedStream(
if (tag == 10) { if (tag == 10) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString( DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_type_url())); input, this->mutable_type_url()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->type_url().data(), this->type_url().length(), this->type_url().data(), this->type_url().length(),
::google::protobuf::internal::WireFormat::PARSE, ::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.Any.type_url"); "google.protobuf.Any.type_url"));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
@ -258,9 +258,9 @@ void Any::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_start:google.protobuf.Any) // @@protoc_insertion_point(serialize_start:google.protobuf.Any)
// optional string type_url = 1; // optional string type_url = 1;
if (this->type_url().size() > 0) { if (this->type_url().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->type_url().data(), this->type_url().length(), this->type_url().data(), this->type_url().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Any.type_url"); "google.protobuf.Any.type_url");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->type_url(), output); 1, this->type_url(), output);
@ -280,9 +280,9 @@ void Any::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Any) // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Any)
// optional string type_url = 1; // optional string type_url = 1;
if (this->type_url().size() > 0) { if (this->type_url().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->type_url().data(), this->type_url().length(), this->type_url().data(), this->type_url().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Any.type_url"); "google.protobuf.Any.type_url");
target = target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray( ::google::protobuf::internal::WireFormatLite::WriteStringToArray(

@ -289,10 +289,10 @@ bool Api::MergePartialFromCodedStream(
if (tag == 10) { if (tag == 10) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString( DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name())); input, this->mutable_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::PARSE, ::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.Api.name"); "google.protobuf.Api.name"));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
@ -339,10 +339,10 @@ bool Api::MergePartialFromCodedStream(
parse_version: parse_version:
DO_(::google::protobuf::internal::WireFormatLite::ReadString( DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_version())); input, this->mutable_version()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->version().data(), this->version().length(), this->version().data(), this->version().length(),
::google::protobuf::internal::WireFormat::PARSE, ::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.Api.version"); "google.protobuf.Api.version"));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
@ -422,9 +422,9 @@ void Api::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_start:google.protobuf.Api) // @@protoc_insertion_point(serialize_start:google.protobuf.Api)
// optional string name = 1; // optional string name = 1;
if (this->name().size() > 0) { if (this->name().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Api.name"); "google.protobuf.Api.name");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->name(), output); 1, this->name(), output);
@ -444,9 +444,9 @@ void Api::SerializeWithCachedSizes(
// optional string version = 4; // optional string version = 4;
if (this->version().size() > 0) { if (this->version().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->version().data(), this->version().length(), this->version().data(), this->version().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Api.version"); "google.protobuf.Api.version");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
4, this->version(), output); 4, this->version(), output);
@ -478,9 +478,9 @@ void Api::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Api) // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Api)
// optional string name = 1; // optional string name = 1;
if (this->name().size() > 0) { if (this->name().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Api.name"); "google.protobuf.Api.name");
target = target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray( ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
@ -503,9 +503,9 @@ void Api::SerializeWithCachedSizes(
// optional string version = 4; // optional string version = 4;
if (this->version().size() > 0) { if (this->version().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->version().data(), this->version().length(), this->version().data(), this->version().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Api.version"); "google.protobuf.Api.version");
target = target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray( ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
@ -723,28 +723,28 @@ int Api::methods_size() const {
void Api::clear_methods() { void Api::clear_methods() {
methods_.Clear(); methods_.Clear();
} }
const ::google::protobuf::Method& Api::methods(int index) const { const ::google::protobuf::Method& Api::methods(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.Api.methods) // @@protoc_insertion_point(field_get:google.protobuf.Api.methods)
return methods_.Get(index); return methods_.Get(index);
} }
::google::protobuf::Method* Api::mutable_methods(int index) { ::google::protobuf::Method* Api::mutable_methods(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.Api.methods) // @@protoc_insertion_point(field_mutable:google.protobuf.Api.methods)
return methods_.Mutable(index); return methods_.Mutable(index);
} }
::google::protobuf::Method* Api::add_methods() { ::google::protobuf::Method* Api::add_methods() {
// @@protoc_insertion_point(field_add:google.protobuf.Api.methods) // @@protoc_insertion_point(field_add:google.protobuf.Api.methods)
return methods_.Add(); return methods_.Add();
} }
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >& ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >*
Api::methods() const {
// @@protoc_insertion_point(field_list:google.protobuf.Api.methods)
return methods_;
}
::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >*
Api::mutable_methods() { Api::mutable_methods() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.methods) // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.methods)
return &methods_; return &methods_;
} }
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >&
Api::methods() const {
// @@protoc_insertion_point(field_list:google.protobuf.Api.methods)
return methods_;
}
// repeated .google.protobuf.Option options = 3; // repeated .google.protobuf.Option options = 3;
int Api::options_size() const { int Api::options_size() const {
@ -753,28 +753,28 @@ int Api::options_size() const {
void Api::clear_options() { void Api::clear_options() {
options_.Clear(); options_.Clear();
} }
const ::google::protobuf::Option& Api::options(int index) const { const ::google::protobuf::Option& Api::options(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.Api.options) // @@protoc_insertion_point(field_get:google.protobuf.Api.options)
return options_.Get(index); return options_.Get(index);
} }
::google::protobuf::Option* Api::mutable_options(int index) { ::google::protobuf::Option* Api::mutable_options(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.Api.options) // @@protoc_insertion_point(field_mutable:google.protobuf.Api.options)
return options_.Mutable(index); return options_.Mutable(index);
} }
::google::protobuf::Option* Api::add_options() { ::google::protobuf::Option* Api::add_options() {
// @@protoc_insertion_point(field_add:google.protobuf.Api.options) // @@protoc_insertion_point(field_add:google.protobuf.Api.options)
return options_.Add(); return options_.Add();
} }
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
Api::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Api.options)
return options_;
}
::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
Api::mutable_options() { Api::mutable_options() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.options) // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.options)
return &options_; return &options_;
} }
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
Api::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Api.options)
return options_;
}
// optional string version = 4; // optional string version = 4;
void Api::clear_version() { void Api::clear_version() {
@ -827,11 +827,11 @@ void Api::clear_source_context() {
if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_; if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_;
source_context_ = NULL; source_context_ = NULL;
} }
const ::google::protobuf::SourceContext& Api::source_context() const { const ::google::protobuf::SourceContext& Api::source_context() const {
// @@protoc_insertion_point(field_get:google.protobuf.Api.source_context) // @@protoc_insertion_point(field_get:google.protobuf.Api.source_context)
return source_context_ != NULL ? *source_context_ : *default_instance_->source_context_; return source_context_ != NULL ? *source_context_ : *default_instance_->source_context_;
} }
::google::protobuf::SourceContext* Api::mutable_source_context() { ::google::protobuf::SourceContext* Api::mutable_source_context() {
if (source_context_ == NULL) { if (source_context_ == NULL) {
source_context_ = new ::google::protobuf::SourceContext; source_context_ = new ::google::protobuf::SourceContext;
@ -839,13 +839,13 @@ void Api::clear_source_context() {
// @@protoc_insertion_point(field_mutable:google.protobuf.Api.source_context) // @@protoc_insertion_point(field_mutable:google.protobuf.Api.source_context)
return source_context_; return source_context_;
} }
::google::protobuf::SourceContext* Api::release_source_context() { ::google::protobuf::SourceContext* Api::release_source_context() {
::google::protobuf::SourceContext* temp = source_context_; ::google::protobuf::SourceContext* temp = source_context_;
source_context_ = NULL; source_context_ = NULL;
return temp; return temp;
} }
void Api::set_allocated_source_context(::google::protobuf::SourceContext* source_context) { void Api::set_allocated_source_context(::google::protobuf::SourceContext* source_context) {
delete source_context_; delete source_context_;
source_context_ = source_context; source_context_ = source_context;
if (source_context) { if (source_context) {
@ -863,28 +863,28 @@ int Api::mixins_size() const {
void Api::clear_mixins() { void Api::clear_mixins() {
mixins_.Clear(); mixins_.Clear();
} }
const ::google::protobuf::Mixin& Api::mixins(int index) const { const ::google::protobuf::Mixin& Api::mixins(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.Api.mixins) // @@protoc_insertion_point(field_get:google.protobuf.Api.mixins)
return mixins_.Get(index); return mixins_.Get(index);
} }
::google::protobuf::Mixin* Api::mutable_mixins(int index) { ::google::protobuf::Mixin* Api::mutable_mixins(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.Api.mixins) // @@protoc_insertion_point(field_mutable:google.protobuf.Api.mixins)
return mixins_.Mutable(index); return mixins_.Mutable(index);
} }
::google::protobuf::Mixin* Api::add_mixins() { ::google::protobuf::Mixin* Api::add_mixins() {
// @@protoc_insertion_point(field_add:google.protobuf.Api.mixins) // @@protoc_insertion_point(field_add:google.protobuf.Api.mixins)
return mixins_.Add(); return mixins_.Add();
} }
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >& ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >*
Api::mixins() const {
// @@protoc_insertion_point(field_list:google.protobuf.Api.mixins)
return mixins_;
}
::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >*
Api::mutable_mixins() { Api::mutable_mixins() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.mixins) // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.mixins)
return &mixins_; return &mixins_;
} }
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >&
Api::mixins() const {
// @@protoc_insertion_point(field_list:google.protobuf.Api.mixins)
return mixins_;
}
// optional .google.protobuf.Syntax syntax = 7; // optional .google.protobuf.Syntax syntax = 7;
void Api::clear_syntax() { void Api::clear_syntax() {
@ -1017,10 +1017,10 @@ bool Method::MergePartialFromCodedStream(
if (tag == 10) { if (tag == 10) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString( DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name())); input, this->mutable_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::PARSE, ::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.Method.name"); "google.protobuf.Method.name"));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
@ -1034,10 +1034,10 @@ bool Method::MergePartialFromCodedStream(
parse_request_type_url: parse_request_type_url:
DO_(::google::protobuf::internal::WireFormatLite::ReadString( DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_request_type_url())); input, this->mutable_request_type_url()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->request_type_url().data(), this->request_type_url().length(), this->request_type_url().data(), this->request_type_url().length(),
::google::protobuf::internal::WireFormat::PARSE, ::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.Method.request_type_url"); "google.protobuf.Method.request_type_url"));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
@ -1066,10 +1066,10 @@ bool Method::MergePartialFromCodedStream(
parse_response_type_url: parse_response_type_url:
DO_(::google::protobuf::internal::WireFormatLite::ReadString( DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_response_type_url())); input, this->mutable_response_type_url()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->response_type_url().data(), this->response_type_url().length(), this->response_type_url().data(), this->response_type_url().length(),
::google::protobuf::internal::WireFormat::PARSE, ::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.Method.response_type_url"); "google.protobuf.Method.response_type_url"));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
@ -1151,9 +1151,9 @@ void Method::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_start:google.protobuf.Method) // @@protoc_insertion_point(serialize_start:google.protobuf.Method)
// optional string name = 1; // optional string name = 1;
if (this->name().size() > 0) { if (this->name().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Method.name"); "google.protobuf.Method.name");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->name(), output); 1, this->name(), output);
@ -1161,9 +1161,9 @@ void Method::SerializeWithCachedSizes(
// optional string request_type_url = 2; // optional string request_type_url = 2;
if (this->request_type_url().size() > 0) { if (this->request_type_url().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->request_type_url().data(), this->request_type_url().length(), this->request_type_url().data(), this->request_type_url().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Method.request_type_url"); "google.protobuf.Method.request_type_url");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->request_type_url(), output); 2, this->request_type_url(), output);
@ -1176,9 +1176,9 @@ void Method::SerializeWithCachedSizes(
// optional string response_type_url = 4; // optional string response_type_url = 4;
if (this->response_type_url().size() > 0) { if (this->response_type_url().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->response_type_url().data(), this->response_type_url().length(), this->response_type_url().data(), this->response_type_url().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Method.response_type_url"); "google.protobuf.Method.response_type_url");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
4, this->response_type_url(), output); 4, this->response_type_url(), output);
@ -1209,9 +1209,9 @@ void Method::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Method) // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Method)
// optional string name = 1; // optional string name = 1;
if (this->name().size() > 0) { if (this->name().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Method.name"); "google.protobuf.Method.name");
target = target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray( ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
@ -1220,9 +1220,9 @@ void Method::SerializeWithCachedSizes(
// optional string request_type_url = 2; // optional string request_type_url = 2;
if (this->request_type_url().size() > 0) { if (this->request_type_url().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->request_type_url().data(), this->request_type_url().length(), this->request_type_url().data(), this->request_type_url().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Method.request_type_url"); "google.protobuf.Method.request_type_url");
target = target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray( ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
@ -1236,9 +1236,9 @@ void Method::SerializeWithCachedSizes(
// optional string response_type_url = 4; // optional string response_type_url = 4;
if (this->response_type_url().size() > 0) { if (this->response_type_url().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->response_type_url().data(), this->response_type_url().length(), this->response_type_url().data(), this->response_type_url().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Method.response_type_url"); "google.protobuf.Method.response_type_url");
target = target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray( ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
@ -1567,28 +1567,28 @@ int Method::options_size() const {
void Method::clear_options() { void Method::clear_options() {
options_.Clear(); options_.Clear();
} }
const ::google::protobuf::Option& Method::options(int index) const { const ::google::protobuf::Option& Method::options(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.Method.options) // @@protoc_insertion_point(field_get:google.protobuf.Method.options)
return options_.Get(index); return options_.Get(index);
} }
::google::protobuf::Option* Method::mutable_options(int index) { ::google::protobuf::Option* Method::mutable_options(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.Method.options) // @@protoc_insertion_point(field_mutable:google.protobuf.Method.options)
return options_.Mutable(index); return options_.Mutable(index);
} }
::google::protobuf::Option* Method::add_options() { ::google::protobuf::Option* Method::add_options() {
// @@protoc_insertion_point(field_add:google.protobuf.Method.options) // @@protoc_insertion_point(field_add:google.protobuf.Method.options)
return options_.Add(); return options_.Add();
} }
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
Method::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Method.options)
return options_;
}
::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
Method::mutable_options() { Method::mutable_options() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Method.options) // @@protoc_insertion_point(field_mutable_list:google.protobuf.Method.options)
return &options_; return &options_;
} }
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
Method::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Method.options)
return options_;
}
// optional .google.protobuf.Syntax syntax = 7; // optional .google.protobuf.Syntax syntax = 7;
void Method::clear_syntax() { void Method::clear_syntax() {
@ -1696,10 +1696,10 @@ bool Mixin::MergePartialFromCodedStream(
if (tag == 10) { if (tag == 10) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString( DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name())); input, this->mutable_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::PARSE, ::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.Mixin.name"); "google.protobuf.Mixin.name"));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
@ -1713,10 +1713,10 @@ bool Mixin::MergePartialFromCodedStream(
parse_root: parse_root:
DO_(::google::protobuf::internal::WireFormatLite::ReadString( DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_root())); input, this->mutable_root()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->root().data(), this->root().length(), this->root().data(), this->root().length(),
::google::protobuf::internal::WireFormat::PARSE, ::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.Mixin.root"); "google.protobuf.Mixin.root"));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
@ -1750,9 +1750,9 @@ void Mixin::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_start:google.protobuf.Mixin) // @@protoc_insertion_point(serialize_start:google.protobuf.Mixin)
// optional string name = 1; // optional string name = 1;
if (this->name().size() > 0) { if (this->name().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Mixin.name"); "google.protobuf.Mixin.name");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->name(), output); 1, this->name(), output);
@ -1760,9 +1760,9 @@ void Mixin::SerializeWithCachedSizes(
// optional string root = 2; // optional string root = 2;
if (this->root().size() > 0) { if (this->root().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->root().data(), this->root().length(), this->root().data(), this->root().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Mixin.root"); "google.protobuf.Mixin.root");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->root(), output); 2, this->root(), output);
@ -1776,9 +1776,9 @@ void Mixin::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Mixin) // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Mixin)
// optional string name = 1; // optional string name = 1;
if (this->name().size() > 0) { if (this->name().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Mixin.name"); "google.protobuf.Mixin.name");
target = target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray( ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
@ -1787,9 +1787,9 @@ void Mixin::SerializeWithCachedSizes(
// optional string root = 2; // optional string root = 2;
if (this->root().size() > 0) { if (this->root().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->root().data(), this->root().length(), this->root().data(), this->root().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Mixin.root"); "google.protobuf.Mixin.root");
target = target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray( ::google::protobuf::internal::WireFormatLite::WriteStringToArray(

@ -119,10 +119,10 @@ class LIBPROTOBUF_EXPORT Api : public ::google::protobuf::Message {
const ::google::protobuf::Method& methods(int index) const; const ::google::protobuf::Method& methods(int index) const;
::google::protobuf::Method* mutable_methods(int index); ::google::protobuf::Method* mutable_methods(int index);
::google::protobuf::Method* add_methods(); ::google::protobuf::Method* add_methods();
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >&
methods() const;
::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >* ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >*
mutable_methods(); mutable_methods();
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >&
methods() const;
// repeated .google.protobuf.Option options = 3; // repeated .google.protobuf.Option options = 3;
int options_size() const; int options_size() const;
@ -131,10 +131,10 @@ class LIBPROTOBUF_EXPORT Api : public ::google::protobuf::Message {
const ::google::protobuf::Option& options(int index) const; const ::google::protobuf::Option& options(int index) const;
::google::protobuf::Option* mutable_options(int index); ::google::protobuf::Option* mutable_options(int index);
::google::protobuf::Option* add_options(); ::google::protobuf::Option* add_options();
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
options() const;
::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
mutable_options(); mutable_options();
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
options() const;
// optional string version = 4; // optional string version = 4;
void clear_version(); void clear_version();
@ -163,10 +163,10 @@ class LIBPROTOBUF_EXPORT Api : public ::google::protobuf::Message {
const ::google::protobuf::Mixin& mixins(int index) const; const ::google::protobuf::Mixin& mixins(int index) const;
::google::protobuf::Mixin* mutable_mixins(int index); ::google::protobuf::Mixin* mutable_mixins(int index);
::google::protobuf::Mixin* add_mixins(); ::google::protobuf::Mixin* add_mixins();
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >&
mixins() const;
::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >* ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >*
mutable_mixins(); mutable_mixins();
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >&
mixins() const;
// optional .google.protobuf.Syntax syntax = 7; // optional .google.protobuf.Syntax syntax = 7;
void clear_syntax(); void clear_syntax();
@ -304,10 +304,10 @@ class LIBPROTOBUF_EXPORT Method : public ::google::protobuf::Message {
const ::google::protobuf::Option& options(int index) const; const ::google::protobuf::Option& options(int index) const;
::google::protobuf::Option* mutable_options(int index); ::google::protobuf::Option* mutable_options(int index);
::google::protobuf::Option* add_options(); ::google::protobuf::Option* add_options();
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
options() const;
::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
mutable_options(); mutable_options();
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
options() const;
// optional .google.protobuf.Syntax syntax = 7; // optional .google.protobuf.Syntax syntax = 7;
void clear_syntax(); void clear_syntax();
@ -500,16 +500,16 @@ inline ::google::protobuf::Method* Api::add_methods() {
// @@protoc_insertion_point(field_add:google.protobuf.Api.methods) // @@protoc_insertion_point(field_add:google.protobuf.Api.methods)
return methods_.Add(); return methods_.Add();
} }
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >&
Api::methods() const {
// @@protoc_insertion_point(field_list:google.protobuf.Api.methods)
return methods_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >* inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >*
Api::mutable_methods() { Api::mutable_methods() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.methods) // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.methods)
return &methods_; return &methods_;
} }
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >&
Api::methods() const {
// @@protoc_insertion_point(field_list:google.protobuf.Api.methods)
return methods_;
}
// repeated .google.protobuf.Option options = 3; // repeated .google.protobuf.Option options = 3;
inline int Api::options_size() const { inline int Api::options_size() const {
@ -530,16 +530,16 @@ inline ::google::protobuf::Option* Api::add_options() {
// @@protoc_insertion_point(field_add:google.protobuf.Api.options) // @@protoc_insertion_point(field_add:google.protobuf.Api.options)
return options_.Add(); return options_.Add();
} }
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
Api::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Api.options)
return options_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
Api::mutable_options() { Api::mutable_options() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.options) // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.options)
return &options_; return &options_;
} }
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
Api::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Api.options)
return options_;
}
// optional string version = 4; // optional string version = 4;
inline void Api::clear_version() { inline void Api::clear_version() {
@ -640,16 +640,16 @@ inline ::google::protobuf::Mixin* Api::add_mixins() {
// @@protoc_insertion_point(field_add:google.protobuf.Api.mixins) // @@protoc_insertion_point(field_add:google.protobuf.Api.mixins)
return mixins_.Add(); return mixins_.Add();
} }
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >&
Api::mixins() const {
// @@protoc_insertion_point(field_list:google.protobuf.Api.mixins)
return mixins_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >* inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >*
Api::mutable_mixins() { Api::mutable_mixins() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.mixins) // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.mixins)
return &mixins_; return &mixins_;
} }
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >&
Api::mixins() const {
// @@protoc_insertion_point(field_list:google.protobuf.Api.mixins)
return mixins_;
}
// optional .google.protobuf.Syntax syntax = 7; // optional .google.protobuf.Syntax syntax = 7;
inline void Api::clear_syntax() { inline void Api::clear_syntax() {
@ -845,16 +845,16 @@ inline ::google::protobuf::Option* Method::add_options() {
// @@protoc_insertion_point(field_add:google.protobuf.Method.options) // @@protoc_insertion_point(field_add:google.protobuf.Method.options)
return options_.Add(); return options_.Add();
} }
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
Method::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Method.options)
return options_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
Method::mutable_options() { Method::mutable_options() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Method.options) // @@protoc_insertion_point(field_mutable_list:google.protobuf.Method.options)
return &options_; return &options_;
} }
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
Method::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Method.options)
return options_;
}
// optional .google.protobuf.Syntax syntax = 7; // optional .google.protobuf.Syntax syntax = 7;
inline void Method::clear_syntax() { inline void Method::clear_syntax() {

@ -32,6 +32,9 @@
#define GOOGLE_PROTOBUF_ARENA_H__ #define GOOGLE_PROTOBUF_ARENA_H__
#include <limits> #include <limits>
#ifdef max
#undef max // Visual Studio defines this macro
#endif
#if __cplusplus >= 201103L #if __cplusplus >= 201103L
#include <google/protobuf/stubs/type_traits.h> #include <google/protobuf/stubs/type_traits.h>
#endif #endif

@ -55,7 +55,9 @@
#include <google/protobuf/unittest.pb.h> #include <google/protobuf/unittest.pb.h>
#include <google/protobuf/unittest_optimize_for.pb.h> #include <google/protobuf/unittest_optimize_for.pb.h>
#include <google/protobuf/unittest_embed_optimize_for.pb.h> #include <google/protobuf/unittest_embed_optimize_for.pb.h>
#if !defined(_MSC_VER) // Too large for visual studio to compile
#include <google/protobuf/unittest_enormous_descriptor.pb.h> #include <google/protobuf/unittest_enormous_descriptor.pb.h>
#endif
#include <google/protobuf/unittest_no_generic_services.pb.h> #include <google/protobuf/unittest_no_generic_services.pb.h>
#include <google/protobuf/test_util.h> #include <google/protobuf/test_util.h>
#include <google/protobuf/compiler/cpp/cpp_helpers.h> #include <google/protobuf/compiler/cpp/cpp_helpers.h>
@ -133,6 +135,7 @@ TEST(GeneratedDescriptorTest, IdenticalDescriptors) {
generated_decsriptor_proto.DebugString()); generated_decsriptor_proto.DebugString());
} }
#if !defined(_MSC_VER)
// Test that generated code has proper descriptors: // Test that generated code has proper descriptors:
// Touch a descriptor generated from an enormous message to validate special // Touch a descriptor generated from an enormous message to validate special
// handling for descriptors exceeding the C++ standard's recommended minimum // handling for descriptors exceeding the C++ standard's recommended minimum
@ -143,6 +146,7 @@ TEST(GeneratedDescriptorTest, EnormousDescriptor) {
EXPECT_TRUE(generated_descriptor != NULL); EXPECT_TRUE(generated_descriptor != NULL);
} }
#endif
#endif // !PROTOBUF_TEST_NO_DESCRIPTORS #endif // !PROTOBUF_TEST_NO_DESCRIPTORS

@ -193,11 +193,11 @@ bool FieldMask::MergePartialFromCodedStream(
parse_paths: parse_paths:
DO_(::google::protobuf::internal::WireFormatLite::ReadString( DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_paths())); input, this->add_paths()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->paths(this->paths_size() - 1).data(), this->paths(this->paths_size() - 1).data(),
this->paths(this->paths_size() - 1).length(), this->paths(this->paths_size() - 1).length(),
::google::protobuf::internal::WireFormat::PARSE, ::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.FieldMask.paths"); "google.protobuf.FieldMask.paths"));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
@ -232,9 +232,9 @@ void FieldMask::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_start:google.protobuf.FieldMask) // @@protoc_insertion_point(serialize_start:google.protobuf.FieldMask)
// repeated string paths = 1; // repeated string paths = 1;
for (int i = 0; i < this->paths_size(); i++) { for (int i = 0; i < this->paths_size(); i++) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->paths(i).data(), this->paths(i).length(), this->paths(i).data(), this->paths(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.FieldMask.paths"); "google.protobuf.FieldMask.paths");
::google::protobuf::internal::WireFormatLite::WriteString( ::google::protobuf::internal::WireFormatLite::WriteString(
1, this->paths(i), output); 1, this->paths(i), output);
@ -248,9 +248,9 @@ void FieldMask::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldMask) // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldMask)
// repeated string paths = 1; // repeated string paths = 1;
for (int i = 0; i < this->paths_size(); i++) { for (int i = 0; i < this->paths_size(); i++) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->paths(i).data(), this->paths(i).length(), this->paths(i).data(), this->paths(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.FieldMask.paths"); "google.protobuf.FieldMask.paths");
target = ::google::protobuf::internal::WireFormatLite:: target = ::google::protobuf::internal::WireFormatLite::
WriteStringToArray(1, this->paths(i), target); WriteStringToArray(1, this->paths(i), target);

@ -417,12 +417,12 @@ class LIBPROTOBUF_EXPORT GeneratedMessageReflection : public Reflection {
protected: protected:
void* MutableRawRepeatedField( void* MutableRawRepeatedField(
Message* message, const FieldDescriptor* field, FieldDescriptor::CppType, Message* message, const FieldDescriptor* field, FieldDescriptor::CppType,
int ctype, const Descriptor* desc) const override; int ctype, const Descriptor* desc) const;
const void* GetRawRepeatedField( const void* GetRawRepeatedField(
const Message& message, const FieldDescriptor* field, const Message& message, const FieldDescriptor* field,
FieldDescriptor::CppType, int ctype, FieldDescriptor::CppType, int ctype,
const Descriptor* desc) const override; const Descriptor* desc) const;
virtual MessageFactory* GetMessageFactory() const; virtual MessageFactory* GetMessageFactory() const;

@ -592,7 +592,7 @@ class Map {
typedef MapAllocator<std::pair<const Key, MapPair<Key, T>*> > Allocator; typedef MapAllocator<std::pair<const Key, MapPair<Key, T>*> > Allocator;
// Iterators // Iterators
class LIBPROTOBUF_EXPORT const_iterator class const_iterator
: public std::iterator<std::forward_iterator_tag, value_type, ptrdiff_t, : public std::iterator<std::forward_iterator_tag, value_type, ptrdiff_t,
const value_type*, const value_type&> { const value_type*, const value_type&> {
typedef typename hash_map<Key, value_type*, hash<Key>, equal_to<Key>, typedef typename hash_map<Key, value_type*, hash<Key>, equal_to<Key>,
@ -853,6 +853,29 @@ struct hash<google::protobuf::MapKey> {
return 0; return 0;
} }
} }
bool
operator()(const google::protobuf::MapKey& map_key1,
const google::protobuf::MapKey& map_key2) const {
switch (map_key1.type()) {
#define COMPARE_CPPTYPE(CPPTYPE, CPPTYPE_METHOD) \
case google::protobuf::FieldDescriptor::CPPTYPE_##CPPTYPE: \
return map_key1.Get##CPPTYPE_METHOD##Value() < \
map_key2.Get##CPPTYPE_METHOD##Value();
COMPARE_CPPTYPE(STRING, String)
COMPARE_CPPTYPE(INT64, Int64)
COMPARE_CPPTYPE(INT32, Int32)
COMPARE_CPPTYPE(UINT64, UInt64)
COMPARE_CPPTYPE(UINT32, UInt32)
COMPARE_CPPTYPE(BOOL, Bool)
#undef COMPARE_CPPTYPE
case google::protobuf::FieldDescriptor::CPPTYPE_DOUBLE:
case google::protobuf::FieldDescriptor::CPPTYPE_FLOAT:
case google::protobuf::FieldDescriptor::CPPTYPE_ENUM:
case google::protobuf::FieldDescriptor::CPPTYPE_MESSAGE:
GOOGLE_LOG(FATAL) << "Can't get here.";
return true;
}
}
}; };
GOOGLE_PROTOBUF_HASH_NAMESPACE_DECLARATION_END GOOGLE_PROTOBUF_HASH_NAMESPACE_DECLARATION_END

@ -292,7 +292,7 @@ class MapEntryLite : public MessageLite {
// only takes references of given key and value. // only takes references of given key and value.
template <typename K, typename V, WireFormatLite::FieldType k_wire_type, template <typename K, typename V, WireFormatLite::FieldType k_wire_type,
WireFormatLite::FieldType v_wire_type, int default_enum> WireFormatLite::FieldType v_wire_type, int default_enum>
class LIBPROTOBUF_EXPORT MapEntryWrapper class MapEntryWrapper
: public MapEntryLite<K, V, k_wire_type, v_wire_type, default_enum> { : public MapEntryLite<K, V, k_wire_type, v_wire_type, default_enum> {
typedef MapEntryLite<K, V, k_wire_type, v_wire_type, default_enum> Base; typedef MapEntryLite<K, V, k_wire_type, v_wire_type, default_enum> Base;
typedef typename Base::KeyMapEntryAccessorType KeyMapEntryAccessorType; typedef typename Base::KeyMapEntryAccessorType KeyMapEntryAccessorType;
@ -326,7 +326,7 @@ class MapEntryLite : public MessageLite {
// the temporary. // the temporary.
template <typename K, typename V, WireFormatLite::FieldType k_wire_type, template <typename K, typename V, WireFormatLite::FieldType k_wire_type,
WireFormatLite::FieldType v_wire_type, int default_enum> WireFormatLite::FieldType v_wire_type, int default_enum>
class LIBPROTOBUF_EXPORT MapEnumEntryWrapper class MapEnumEntryWrapper
: public MapEntryLite<K, V, k_wire_type, v_wire_type, default_enum> { : public MapEntryLite<K, V, k_wire_type, v_wire_type, default_enum> {
typedef MapEntryLite<K, V, k_wire_type, v_wire_type, default_enum> Base; typedef MapEntryLite<K, V, k_wire_type, v_wire_type, default_enum> Base;
typedef typename Base::KeyMapEntryAccessorType KeyMapEntryAccessorType; typedef typename Base::KeyMapEntryAccessorType KeyMapEntryAccessorType;

@ -160,7 +160,7 @@ DynamicMapField::DynamicMapField(const Message* default_entry,
DynamicMapField::~DynamicMapField() { DynamicMapField::~DynamicMapField() {
// DynamicMapField owns map values. Need to delete them before clearing // DynamicMapField owns map values. Need to delete them before clearing
// the map. // the map.
for (typename Map<MapKey, MapValueRef>::iterator iter = map_.begin(); for (Map<MapKey, MapValueRef>::iterator iter = map_.begin();
iter != map_.end(); ++iter) { iter != map_.end(); ++iter) {
iter->second.DeleteData(); iter->second.DeleteData();
} }
@ -174,7 +174,7 @@ int DynamicMapField::size() const {
bool DynamicMapField::ContainsMapKey( bool DynamicMapField::ContainsMapKey(
const MapKey& map_key) const { const MapKey& map_key) const {
const Map<MapKey, MapValueRef>& map = GetMap(); const Map<MapKey, MapValueRef>& map = GetMap();
typename Map<MapKey, MapValueRef>::const_iterator iter = map.find(map_key); Map<MapKey, MapValueRef>::const_iterator iter = map.find(map_key);
return iter != map.end(); return iter != map.end();
} }
@ -246,7 +246,7 @@ Map<MapKey, MapValueRef>* DynamicMapField::MutableMap() {
} }
void DynamicMapField::SetMapIteratorValue(MapIterator* map_iter) const { void DynamicMapField::SetMapIteratorValue(MapIterator* map_iter) const {
typename Map<MapKey, MapValueRef>::const_iterator iter = Map<MapKey, MapValueRef>::const_iterator iter =
TypeDefinedMapFieldBase<MapKey, MapValueRef>::InternalGetIterator( TypeDefinedMapFieldBase<MapKey, MapValueRef>::InternalGetIterator(
map_iter); map_iter);
if (iter == map_.end()) return; if (iter == map_.end()) return;
@ -272,7 +272,7 @@ void DynamicMapField::SyncRepeatedFieldWithMapNoLock() const {
MapFieldBase::repeated_field_->Clear(); MapFieldBase::repeated_field_->Clear();
for (typename Map<MapKey, MapValueRef>::const_iterator it = map_.begin(); for (Map<MapKey, MapValueRef>::const_iterator it = map_.begin();
it != map_.end(); ++it) { it != map_.end(); ++it) {
Message* new_entry = default_entry_->New(); Message* new_entry = default_entry_->New();
MapFieldBase::repeated_field_->AddAllocated(new_entry); MapFieldBase::repeated_field_->AddAllocated(new_entry);
@ -350,12 +350,12 @@ void DynamicMapField::SyncMapWithRepeatedFieldNoLock() const {
default_entry_->GetDescriptor()->FindFieldByName("value"); default_entry_->GetDescriptor()->FindFieldByName("value");
// DynamicMapField owns map values. Need to delete them before clearing // DynamicMapField owns map values. Need to delete them before clearing
// the map. // the map.
for (typename Map<MapKey, MapValueRef>::iterator iter = map->begin(); for (Map<MapKey, MapValueRef>::iterator iter = map->begin();
iter != map->end(); ++iter) { iter != map->end(); ++iter) {
iter->second.DeleteData(); iter->second.DeleteData();
} }
map->clear(); map->clear();
for (typename RepeatedPtrField<Message>::iterator it = for (RepeatedPtrField<Message>::iterator it =
MapFieldBase::repeated_field_->begin(); MapFieldBase::repeated_field_->begin();
it != MapFieldBase::repeated_field_->end(); ++it) { it != MapFieldBase::repeated_field_->end(); ++it) {
MapKey map_key; MapKey map_key;
@ -424,7 +424,7 @@ int DynamicMapField::SpaceUsedExcludingSelfNoLock() const {
size += sizeof(map_); size += sizeof(map_);
int map_size = map_.size(); int map_size = map_.size();
if (map_size) { if (map_size) {
typename Map<MapKey, MapValueRef>::const_iterator it = map_.begin(); Map<MapKey, MapValueRef>::const_iterator it = map_.begin();
size += sizeof(it->first) * map_size; size += sizeof(it->first) * map_size;
size += sizeof(it->second) * map_size; size += sizeof(it->second) * map_size;
// If key is string, add the allocated space. // If key is string, add the allocated space.

@ -153,7 +153,9 @@ void TypeDefinedMapFieldBase<Key, T>::CopyIterator(
const MapIterator& that_iter) const { const MapIterator& that_iter) const {
InternalGetIterator(this_iter) = InternalGetIterator(&that_iter); InternalGetIterator(this_iter) = InternalGetIterator(&that_iter);
this_iter->key_.SetType(that_iter.key_.type()); this_iter->key_.SetType(that_iter.key_.type());
this_iter->value_.SetType(that_iter.value_.type()); // MapValueRef::type() fails when containing data is null. However, if
// this_iter points to MapEnd, data can be null.
this_iter->value_.SetType((FieldDescriptor::CppType)that_iter.value_.type_);
SetMapIteratorValue(this_iter); SetMapIteratorValue(this_iter);
} }

@ -194,10 +194,10 @@ bool SourceContext::MergePartialFromCodedStream(
if (tag == 10) { if (tag == 10) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString( DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_file_name())); input, this->mutable_file_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->file_name().data(), this->file_name().length(), this->file_name().data(), this->file_name().length(),
::google::protobuf::internal::WireFormat::PARSE, ::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.SourceContext.file_name"); "google.protobuf.SourceContext.file_name"));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
@ -231,9 +231,9 @@ void SourceContext::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_start:google.protobuf.SourceContext) // @@protoc_insertion_point(serialize_start:google.protobuf.SourceContext)
// optional string file_name = 1; // optional string file_name = 1;
if (this->file_name().size() > 0) { if (this->file_name().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->file_name().data(), this->file_name().length(), this->file_name().data(), this->file_name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.SourceContext.file_name"); "google.protobuf.SourceContext.file_name");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->file_name(), output); 1, this->file_name(), output);
@ -247,9 +247,9 @@ void SourceContext::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceContext) // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceContext)
// optional string file_name = 1; // optional string file_name = 1;
if (this->file_name().size() > 0) { if (this->file_name().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->file_name().data(), this->file_name().length(), this->file_name().data(), this->file_name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.SourceContext.file_name"); "google.protobuf.SourceContext.file_name");
target = target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray( ::google::protobuf::internal::WireFormatLite::WriteStringToArray(

@ -301,6 +301,10 @@ bool Struct::MergePartialFromCodedStream(
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, entry.get())); input, entry.get()));
(*mutable_fields())[entry->key()].Swap(entry->mutable_value()); (*mutable_fields())[entry->key()].Swap(entry->mutable_value());
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
entry->key().data(), entry->key().length(),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.Struct.FieldsEntry.key"));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
@ -343,6 +347,10 @@ void Struct::SerializeWithCachedSizes(
entry.reset(fields_.NewEntryWrapper(it->first, it->second)); entry.reset(fields_.NewEntryWrapper(it->first, it->second));
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, *entry, output); 1, *entry, output);
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
it->first.data(), it->first.length(),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Struct.FieldsEntry.key");
} }
} }
@ -362,6 +370,10 @@ void Struct::SerializeWithCachedSizes(
target = ::google::protobuf::internal::WireFormatLite:: target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray( WriteMessageNoVirtualToArray(
1, *entry, target); 1, *entry, target);
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
it->first.data(), it->first.length(),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Struct.FieldsEntry.key");
} }
} }
@ -547,6 +559,7 @@ Value* Value::New(::google::protobuf::Arena* arena) const {
} }
void Value::clear_kind() { void Value::clear_kind() {
typedef Value T;
switch(kind_case()) { switch(kind_case()) {
case kNullValue: { case kNullValue: {
// No need to clear // No need to clear
@ -631,10 +644,10 @@ bool Value::MergePartialFromCodedStream(
parse_string_value: parse_string_value:
DO_(::google::protobuf::internal::WireFormatLite::ReadString( DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_string_value())); input, this->mutable_string_value()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->string_value().data(), this->string_value().length(), this->string_value().data(), this->string_value().length(),
::google::protobuf::internal::WireFormat::PARSE, ::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.Value.string_value"); "google.protobuf.Value.string_value"));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
@ -721,9 +734,9 @@ void Value::SerializeWithCachedSizes(
// optional string string_value = 3; // optional string string_value = 3;
if (has_string_value()) { if (has_string_value()) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->string_value().data(), this->string_value().length(), this->string_value().data(), this->string_value().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Value.string_value"); "google.protobuf.Value.string_value");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
3, this->string_value(), output); 3, this->string_value(), output);
@ -765,9 +778,9 @@ void Value::SerializeWithCachedSizes(
// optional string string_value = 3; // optional string string_value = 3;
if (has_string_value()) { if (has_string_value()) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->string_value().data(), this->string_value().length(), this->string_value().data(), this->string_value().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Value.string_value"); "google.protobuf.Value.string_value");
target = target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray( ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
@ -1114,10 +1127,11 @@ void Value::clear_struct_value() {
} }
const ::google::protobuf::Struct& Value::struct_value() const { const ::google::protobuf::Struct& Value::struct_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.Value.struct_value) // @@protoc_insertion_point(field_get:google.protobuf.Value.struct_value)
return has_struct_value() ? *kind_.struct_value_ return has_struct_value()
? *kind_.struct_value_
: ::google::protobuf::Struct::default_instance(); : ::google::protobuf::Struct::default_instance();
} }
::google::protobuf::Struct* Value::mutable_struct_value() { ::google::protobuf::Struct* Value::mutable_struct_value() {
if (!has_struct_value()) { if (!has_struct_value()) {
clear_kind(); clear_kind();
set_has_struct_value(); set_has_struct_value();
@ -1126,7 +1140,7 @@ void Value::clear_struct_value() {
// @@protoc_insertion_point(field_mutable:google.protobuf.Value.struct_value) // @@protoc_insertion_point(field_mutable:google.protobuf.Value.struct_value)
return kind_.struct_value_; return kind_.struct_value_;
} }
::google::protobuf::Struct* Value::release_struct_value() { ::google::protobuf::Struct* Value::release_struct_value() {
if (has_struct_value()) { if (has_struct_value()) {
clear_has_kind(); clear_has_kind();
::google::protobuf::Struct* temp = kind_.struct_value_; ::google::protobuf::Struct* temp = kind_.struct_value_;
@ -1136,7 +1150,7 @@ void Value::clear_struct_value() {
return NULL; return NULL;
} }
} }
void Value::set_allocated_struct_value(::google::protobuf::Struct* struct_value) { void Value::set_allocated_struct_value(::google::protobuf::Struct* struct_value) {
clear_kind(); clear_kind();
if (struct_value) { if (struct_value) {
set_has_struct_value(); set_has_struct_value();
@ -1160,10 +1174,11 @@ void Value::clear_list_value() {
} }
const ::google::protobuf::ListValue& Value::list_value() const { const ::google::protobuf::ListValue& Value::list_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.Value.list_value) // @@protoc_insertion_point(field_get:google.protobuf.Value.list_value)
return has_list_value() ? *kind_.list_value_ return has_list_value()
? *kind_.list_value_
: ::google::protobuf::ListValue::default_instance(); : ::google::protobuf::ListValue::default_instance();
} }
::google::protobuf::ListValue* Value::mutable_list_value() { ::google::protobuf::ListValue* Value::mutable_list_value() {
if (!has_list_value()) { if (!has_list_value()) {
clear_kind(); clear_kind();
set_has_list_value(); set_has_list_value();
@ -1172,7 +1187,7 @@ void Value::clear_list_value() {
// @@protoc_insertion_point(field_mutable:google.protobuf.Value.list_value) // @@protoc_insertion_point(field_mutable:google.protobuf.Value.list_value)
return kind_.list_value_; return kind_.list_value_;
} }
::google::protobuf::ListValue* Value::release_list_value() { ::google::protobuf::ListValue* Value::release_list_value() {
if (has_list_value()) { if (has_list_value()) {
clear_has_kind(); clear_has_kind();
::google::protobuf::ListValue* temp = kind_.list_value_; ::google::protobuf::ListValue* temp = kind_.list_value_;
@ -1182,7 +1197,7 @@ void Value::clear_list_value() {
return NULL; return NULL;
} }
} }
void Value::set_allocated_list_value(::google::protobuf::ListValue* list_value) { void Value::set_allocated_list_value(::google::protobuf::ListValue* list_value) {
clear_kind(); clear_kind();
if (list_value) { if (list_value) {
set_has_list_value(); set_has_list_value();
@ -1422,28 +1437,28 @@ int ListValue::values_size() const {
void ListValue::clear_values() { void ListValue::clear_values() {
values_.Clear(); values_.Clear();
} }
const ::google::protobuf::Value& ListValue::values(int index) const { const ::google::protobuf::Value& ListValue::values(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.ListValue.values) // @@protoc_insertion_point(field_get:google.protobuf.ListValue.values)
return values_.Get(index); return values_.Get(index);
} }
::google::protobuf::Value* ListValue::mutable_values(int index) { ::google::protobuf::Value* ListValue::mutable_values(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.ListValue.values) // @@protoc_insertion_point(field_mutable:google.protobuf.ListValue.values)
return values_.Mutable(index); return values_.Mutable(index);
} }
::google::protobuf::Value* ListValue::add_values() { ::google::protobuf::Value* ListValue::add_values() {
// @@protoc_insertion_point(field_add:google.protobuf.ListValue.values) // @@protoc_insertion_point(field_add:google.protobuf.ListValue.values)
return values_.Add(); return values_.Add();
} }
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >& ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >*
ListValue::values() const {
// @@protoc_insertion_point(field_list:google.protobuf.ListValue.values)
return values_;
}
::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >*
ListValue::mutable_values() { ListValue::mutable_values() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.ListValue.values) // @@protoc_insertion_point(field_mutable_list:google.protobuf.ListValue.values)
return &values_; return &values_;
} }
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >&
ListValue::values() const {
// @@protoc_insertion_point(field_list:google.protobuf.ListValue.values)
return values_;
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS #endif // PROTOBUF_INLINE_NOT_IN_HEADERS

@ -40,9 +40,9 @@ void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto();
void protobuf_AssignDesc_google_2fprotobuf_2fstruct_2eproto(); void protobuf_AssignDesc_google_2fprotobuf_2fstruct_2eproto();
void protobuf_ShutdownFile_google_2fprotobuf_2fstruct_2eproto(); void protobuf_ShutdownFile_google_2fprotobuf_2fstruct_2eproto();
class ListValue;
class Struct; class Struct;
class Value; class Value;
class ListValue;
enum NullValue { enum NullValue {
NULL_VALUE = 0, NULL_VALUE = 0,
@ -383,10 +383,10 @@ class LIBPROTOBUF_EXPORT ListValue : public ::google::protobuf::Message {
const ::google::protobuf::Value& values(int index) const; const ::google::protobuf::Value& values(int index) const;
::google::protobuf::Value* mutable_values(int index); ::google::protobuf::Value* mutable_values(int index);
::google::protobuf::Value* add_values(); ::google::protobuf::Value* add_values();
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >&
values() const;
::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >* ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >*
mutable_values(); mutable_values();
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >&
values() const;
// @@protoc_insertion_point(class_scope:google.protobuf.ListValue) // @@protoc_insertion_point(class_scope:google.protobuf.ListValue)
private: private:
@ -614,7 +614,8 @@ inline void Value::clear_struct_value() {
} }
inline const ::google::protobuf::Struct& Value::struct_value() const { inline const ::google::protobuf::Struct& Value::struct_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.Value.struct_value) // @@protoc_insertion_point(field_get:google.protobuf.Value.struct_value)
return has_struct_value() ? *kind_.struct_value_ return has_struct_value()
? *kind_.struct_value_
: ::google::protobuf::Struct::default_instance(); : ::google::protobuf::Struct::default_instance();
} }
inline ::google::protobuf::Struct* Value::mutable_struct_value() { inline ::google::protobuf::Struct* Value::mutable_struct_value() {
@ -660,7 +661,8 @@ inline void Value::clear_list_value() {
} }
inline const ::google::protobuf::ListValue& Value::list_value() const { inline const ::google::protobuf::ListValue& Value::list_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.Value.list_value) // @@protoc_insertion_point(field_get:google.protobuf.Value.list_value)
return has_list_value() ? *kind_.list_value_ return has_list_value()
? *kind_.list_value_
: ::google::protobuf::ListValue::default_instance(); : ::google::protobuf::ListValue::default_instance();
} }
inline ::google::protobuf::ListValue* Value::mutable_list_value() { inline ::google::protobuf::ListValue* Value::mutable_list_value() {
@ -723,16 +725,16 @@ inline ::google::protobuf::Value* ListValue::add_values() {
// @@protoc_insertion_point(field_add:google.protobuf.ListValue.values) // @@protoc_insertion_point(field_add:google.protobuf.ListValue.values)
return values_.Add(); return values_.Add();
} }
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >&
ListValue::values() const {
// @@protoc_insertion_point(field_list:google.protobuf.ListValue.values)
return values_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >* inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >*
ListValue::mutable_values() { ListValue::mutable_values() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.ListValue.values) // @@protoc_insertion_point(field_mutable_list:google.protobuf.ListValue.values)
return &values_; return &values_;
} }
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >&
ListValue::values() const {
// @@protoc_insertion_point(field_list:google.protobuf.ListValue.values)
return values_;
}
#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
// ------------------------------------------------------------------- // -------------------------------------------------------------------

@ -103,8 +103,8 @@
# define GOOGLE_PROTOBUF_HAS_CXX11_HASH # define GOOGLE_PROTOBUF_HAS_CXX11_HASH
# define GOOGLE_PROTOBUF_HASH_COMPARE std::hash_compare # define GOOGLE_PROTOBUF_HASH_COMPARE std::hash_compare
# elif _MSC_VER >= 1500 // Since Visual Studio 2008 # elif _MSC_VER >= 1500 // Since Visual Studio 2008
# define GOOGLE_PROTOBUF_HAS_TR1 # undef GOOGLE_PROTOBUF_HAVE_HASH_MAP
# define GOOGLE_PROTOBUF_HASH_COMPARE stdext::hash_compare # undef GOOGLE_PROTOBUF_HAVE_HASH_SET
# elif _MSC_VER >= 1310 # elif _MSC_VER >= 1310
# define GOOGLE_PROTOBUF_HASH_NAMESPACE stdext # define GOOGLE_PROTOBUF_HASH_NAMESPACE stdext
# include <hash_map> # include <hash_map>
@ -143,20 +143,10 @@
# define GOOGLE_PROTOBUF_HASH_SET_CLASS unordered_set # define GOOGLE_PROTOBUF_HASH_SET_CLASS unordered_set
#endif #endif
#ifndef GOOGLE_PROTOBUF_HASH_NAMESPACE
# define GOOGLE_PROTOBUF_HASH_NAMESPACE_DECLARATION_START
# define GOOGLE_PROTOBUF_HASH_NAMESPACE_DECLARATION_END
#elif !defined(GOOGLE_PROTOBUF_HAS_CXX11_HASH) && \
defined(GOOGLE_PROTOBUF_HAS_TR1)
# define GOOGLE_PROTOBUF_HASH_NAMESPACE_DECLARATION_START \ # define GOOGLE_PROTOBUF_HASH_NAMESPACE_DECLARATION_START \
namespace std { \ namespace google { \
namespace tr1 { namespace protobuf {
# define GOOGLE_PROTOBUF_HASH_NAMESPACE_DECLARATION_END }} # define GOOGLE_PROTOBUF_HASH_NAMESPACE_DECLARATION_END }}
#else
# define GOOGLE_PROTOBUF_HASH_NAMESPACE_DECLARATION_START \
namespace GOOGLE_PROTOBUF_HASH_NAMESPACE {
# define GOOGLE_PROTOBUF_HASH_NAMESPACE_DECLARATION_END }
#endif
#undef GOOGLE_PROTOBUF_HAS_CXX11_HASH #undef GOOGLE_PROTOBUF_HAS_CXX11_HASH
#undef GOOGLE_PROTOBUF_HAS_TR1 #undef GOOGLE_PROTOBUF_HAS_TR1

@ -48,7 +48,7 @@ struct uint128_pod;
#endif #endif
// An unsigned 128-bit integer type. Thread-compatible. // An unsigned 128-bit integer type. Thread-compatible.
class uint128 { class LIBPROTOBUF_EXPORT uint128 {
public: public:
UINT128_CONSTEXPR uint128(); // Sets to 0, but don't trust on this behavior. UINT128_CONSTEXPR uint128(); // Sets to 0, but don't trust on this behavior.
UINT128_CONSTEXPR uint128(uint64 top, uint64 bottom); UINT128_CONSTEXPR uint128(uint64 top, uint64 bottom);
@ -84,7 +84,8 @@ class uint128 {
friend uint64 Uint128High64(const uint128& v); friend uint64 Uint128High64(const uint128& v);
// We add "std::" to avoid including all of port.h. // We add "std::" to avoid including all of port.h.
friend std::ostream& operator<<(std::ostream& o, const uint128& b); LIBPROTOBUF_EXPORT friend std::ostream& operator<<(std::ostream& o,
const uint128& b);
private: private:
static void DivModImpl(uint128 dividend, uint128 divisor, static void DivModImpl(uint128 dividend, uint128 divisor,
@ -115,10 +116,11 @@ struct uint128_pod {
uint64 lo; uint64 lo;
}; };
extern const uint128_pod kuint128max; LIBPROTOBUF_EXPORT extern const uint128_pod kuint128max;
// allow uint128 to be logged // allow uint128 to be logged
extern std::ostream& operator<<(std::ostream& o, const uint128& b); LIBPROTOBUF_EXPORT extern std::ostream& operator<<(std::ostream& o,
const uint128& b);
// Methods to access low and high pieces of 128-bit value. // Methods to access low and high pieces of 128-bit value.
// Defined externally from uint128 to facilitate conversion // Defined externally from uint128 to facilitate conversion

@ -45,9 +45,21 @@ bool IsNan(T value) {
return false; return false;
} }
template<> template<>
inline bool IsNan(float value) { return isnan(value); } inline bool IsNan(float value) {
#ifdef _MSC_VER
return _isnan(value);
#else
return isnan(value);
#endif
}
template<> template<>
inline bool IsNan(double value) { return isnan(value); } inline bool IsNan(double value) {
#ifdef _MSC_VER
return _isnan(value);
#else
return isnan(value);
#endif
}
template<typename T> template<typename T>
bool AlmostEquals(T a, T b) { bool AlmostEquals(T a, T b) {

@ -30,7 +30,6 @@
#include <google/protobuf/stubs/status.h> #include <google/protobuf/stubs/status.h>
#include <ostream> #include <ostream>
#include <stdint.h>
#include <stdio.h> #include <stdio.h>
#include <string> #include <string>
#include <utility> #include <utility>

@ -381,10 +381,10 @@ bool Type::MergePartialFromCodedStream(
if (tag == 10) { if (tag == 10) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString( DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name())); input, this->mutable_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::PARSE, ::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.Type.name"); "google.protobuf.Type.name"));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
@ -415,11 +415,11 @@ bool Type::MergePartialFromCodedStream(
parse_oneofs: parse_oneofs:
DO_(::google::protobuf::internal::WireFormatLite::ReadString( DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_oneofs())); input, this->add_oneofs()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->oneofs(this->oneofs_size() - 1).data(), this->oneofs(this->oneofs_size() - 1).data(),
this->oneofs(this->oneofs_size() - 1).length(), this->oneofs(this->oneofs_size() - 1).length(),
::google::protobuf::internal::WireFormat::PARSE, ::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.Type.oneofs"); "google.protobuf.Type.oneofs"));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
@ -500,9 +500,9 @@ void Type::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_start:google.protobuf.Type) // @@protoc_insertion_point(serialize_start:google.protobuf.Type)
// optional string name = 1; // optional string name = 1;
if (this->name().size() > 0) { if (this->name().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Type.name"); "google.protobuf.Type.name");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->name(), output); 1, this->name(), output);
@ -516,9 +516,9 @@ void Type::SerializeWithCachedSizes(
// repeated string oneofs = 3; // repeated string oneofs = 3;
for (int i = 0; i < this->oneofs_size(); i++) { for (int i = 0; i < this->oneofs_size(); i++) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->oneofs(i).data(), this->oneofs(i).length(), this->oneofs(i).data(), this->oneofs(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Type.oneofs"); "google.protobuf.Type.oneofs");
::google::protobuf::internal::WireFormatLite::WriteString( ::google::protobuf::internal::WireFormatLite::WriteString(
3, this->oneofs(i), output); 3, this->oneofs(i), output);
@ -550,9 +550,9 @@ void Type::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Type) // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Type)
// optional string name = 1; // optional string name = 1;
if (this->name().size() > 0) { if (this->name().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Type.name"); "google.protobuf.Type.name");
target = target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray( ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
@ -568,9 +568,9 @@ void Type::SerializeWithCachedSizes(
// repeated string oneofs = 3; // repeated string oneofs = 3;
for (int i = 0; i < this->oneofs_size(); i++) { for (int i = 0; i < this->oneofs_size(); i++) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->oneofs(i).data(), this->oneofs(i).length(), this->oneofs(i).data(), this->oneofs(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Type.oneofs"); "google.protobuf.Type.oneofs");
target = ::google::protobuf::internal::WireFormatLite:: target = ::google::protobuf::internal::WireFormatLite::
WriteStringToArray(3, this->oneofs(i), target); WriteStringToArray(3, this->oneofs(i), target);
@ -774,28 +774,28 @@ int Type::fields_size() const {
void Type::clear_fields() { void Type::clear_fields() {
fields_.Clear(); fields_.Clear();
} }
const ::google::protobuf::Field& Type::fields(int index) const { const ::google::protobuf::Field& Type::fields(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.Type.fields) // @@protoc_insertion_point(field_get:google.protobuf.Type.fields)
return fields_.Get(index); return fields_.Get(index);
} }
::google::protobuf::Field* Type::mutable_fields(int index) { ::google::protobuf::Field* Type::mutable_fields(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.Type.fields) // @@protoc_insertion_point(field_mutable:google.protobuf.Type.fields)
return fields_.Mutable(index); return fields_.Mutable(index);
} }
::google::protobuf::Field* Type::add_fields() { ::google::protobuf::Field* Type::add_fields() {
// @@protoc_insertion_point(field_add:google.protobuf.Type.fields) // @@protoc_insertion_point(field_add:google.protobuf.Type.fields)
return fields_.Add(); return fields_.Add();
} }
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >& ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >*
Type::fields() const {
// @@protoc_insertion_point(field_list:google.protobuf.Type.fields)
return fields_;
}
::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >*
Type::mutable_fields() { Type::mutable_fields() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.fields) // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.fields)
return &fields_; return &fields_;
} }
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >&
Type::fields() const {
// @@protoc_insertion_point(field_list:google.protobuf.Type.fields)
return fields_;
}
// repeated string oneofs = 3; // repeated string oneofs = 3;
int Type::oneofs_size() const { int Type::oneofs_size() const {
@ -858,28 +858,28 @@ int Type::options_size() const {
void Type::clear_options() { void Type::clear_options() {
options_.Clear(); options_.Clear();
} }
const ::google::protobuf::Option& Type::options(int index) const { const ::google::protobuf::Option& Type::options(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.Type.options) // @@protoc_insertion_point(field_get:google.protobuf.Type.options)
return options_.Get(index); return options_.Get(index);
} }
::google::protobuf::Option* Type::mutable_options(int index) { ::google::protobuf::Option* Type::mutable_options(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.Type.options) // @@protoc_insertion_point(field_mutable:google.protobuf.Type.options)
return options_.Mutable(index); return options_.Mutable(index);
} }
::google::protobuf::Option* Type::add_options() { ::google::protobuf::Option* Type::add_options() {
// @@protoc_insertion_point(field_add:google.protobuf.Type.options) // @@protoc_insertion_point(field_add:google.protobuf.Type.options)
return options_.Add(); return options_.Add();
} }
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
Type::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Type.options)
return options_;
}
::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
Type::mutable_options() { Type::mutable_options() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.options) // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.options)
return &options_; return &options_;
} }
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
Type::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Type.options)
return options_;
}
// optional .google.protobuf.SourceContext source_context = 5; // optional .google.protobuf.SourceContext source_context = 5;
bool Type::has_source_context() const { bool Type::has_source_context() const {
@ -889,11 +889,11 @@ void Type::clear_source_context() {
if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_; if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_;
source_context_ = NULL; source_context_ = NULL;
} }
const ::google::protobuf::SourceContext& Type::source_context() const { const ::google::protobuf::SourceContext& Type::source_context() const {
// @@protoc_insertion_point(field_get:google.protobuf.Type.source_context) // @@protoc_insertion_point(field_get:google.protobuf.Type.source_context)
return source_context_ != NULL ? *source_context_ : *default_instance_->source_context_; return source_context_ != NULL ? *source_context_ : *default_instance_->source_context_;
} }
::google::protobuf::SourceContext* Type::mutable_source_context() { ::google::protobuf::SourceContext* Type::mutable_source_context() {
if (source_context_ == NULL) { if (source_context_ == NULL) {
source_context_ = new ::google::protobuf::SourceContext; source_context_ = new ::google::protobuf::SourceContext;
@ -901,13 +901,13 @@ void Type::clear_source_context() {
// @@protoc_insertion_point(field_mutable:google.protobuf.Type.source_context) // @@protoc_insertion_point(field_mutable:google.protobuf.Type.source_context)
return source_context_; return source_context_;
} }
::google::protobuf::SourceContext* Type::release_source_context() { ::google::protobuf::SourceContext* Type::release_source_context() {
::google::protobuf::SourceContext* temp = source_context_; ::google::protobuf::SourceContext* temp = source_context_;
source_context_ = NULL; source_context_ = NULL;
return temp; return temp;
} }
void Type::set_allocated_source_context(::google::protobuf::SourceContext* source_context) { void Type::set_allocated_source_context(::google::protobuf::SourceContext* source_context) {
delete source_context_; delete source_context_;
source_context_ = source_context; source_context_ = source_context;
if (source_context) { if (source_context) {
@ -1182,10 +1182,10 @@ bool Field::MergePartialFromCodedStream(
parse_name: parse_name:
DO_(::google::protobuf::internal::WireFormatLite::ReadString( DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name())); input, this->mutable_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::PARSE, ::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.Field.name"); "google.protobuf.Field.name"));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
@ -1199,10 +1199,10 @@ bool Field::MergePartialFromCodedStream(
parse_type_url: parse_type_url:
DO_(::google::protobuf::internal::WireFormatLite::ReadString( DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_type_url())); input, this->mutable_type_url()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->type_url().data(), this->type_url().length(), this->type_url().data(), this->type_url().length(),
::google::protobuf::internal::WireFormat::PARSE, ::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.Field.type_url"); "google.protobuf.Field.type_url"));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
@ -1263,10 +1263,10 @@ bool Field::MergePartialFromCodedStream(
parse_json_name: parse_json_name:
DO_(::google::protobuf::internal::WireFormatLite::ReadString( DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_json_name())); input, this->mutable_json_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->json_name().data(), this->json_name().length(), this->json_name().data(), this->json_name().length(),
::google::protobuf::internal::WireFormat::PARSE, ::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.Field.json_name"); "google.protobuf.Field.json_name"));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
@ -1317,9 +1317,9 @@ void Field::SerializeWithCachedSizes(
// optional string name = 4; // optional string name = 4;
if (this->name().size() > 0) { if (this->name().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Field.name"); "google.protobuf.Field.name");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
4, this->name(), output); 4, this->name(), output);
@ -1327,9 +1327,9 @@ void Field::SerializeWithCachedSizes(
// optional string type_url = 6; // optional string type_url = 6;
if (this->type_url().size() > 0) { if (this->type_url().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->type_url().data(), this->type_url().length(), this->type_url().data(), this->type_url().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Field.type_url"); "google.protobuf.Field.type_url");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
6, this->type_url(), output); 6, this->type_url(), output);
@ -1353,9 +1353,9 @@ void Field::SerializeWithCachedSizes(
// optional string json_name = 10; // optional string json_name = 10;
if (this->json_name().size() > 0) { if (this->json_name().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->json_name().data(), this->json_name().length(), this->json_name().data(), this->json_name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Field.json_name"); "google.protobuf.Field.json_name");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
10, this->json_name(), output); 10, this->json_name(), output);
@ -1386,9 +1386,9 @@ void Field::SerializeWithCachedSizes(
// optional string name = 4; // optional string name = 4;
if (this->name().size() > 0) { if (this->name().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Field.name"); "google.protobuf.Field.name");
target = target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray( ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
@ -1397,9 +1397,9 @@ void Field::SerializeWithCachedSizes(
// optional string type_url = 6; // optional string type_url = 6;
if (this->type_url().size() > 0) { if (this->type_url().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->type_url().data(), this->type_url().length(), this->type_url().data(), this->type_url().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Field.type_url"); "google.protobuf.Field.type_url");
target = target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray( ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
@ -1425,9 +1425,9 @@ void Field::SerializeWithCachedSizes(
// optional string json_name = 10; // optional string json_name = 10;
if (this->json_name().size() > 0) { if (this->json_name().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->json_name().data(), this->json_name().length(), this->json_name().data(), this->json_name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Field.json_name"); "google.protobuf.Field.json_name");
target = target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray( ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
@ -1760,28 +1760,28 @@ int Field::options_size() const {
void Field::clear_options() { void Field::clear_options() {
options_.Clear(); options_.Clear();
} }
const ::google::protobuf::Option& Field::options(int index) const { const ::google::protobuf::Option& Field::options(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.Field.options) // @@protoc_insertion_point(field_get:google.protobuf.Field.options)
return options_.Get(index); return options_.Get(index);
} }
::google::protobuf::Option* Field::mutable_options(int index) { ::google::protobuf::Option* Field::mutable_options(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.Field.options) // @@protoc_insertion_point(field_mutable:google.protobuf.Field.options)
return options_.Mutable(index); return options_.Mutable(index);
} }
::google::protobuf::Option* Field::add_options() { ::google::protobuf::Option* Field::add_options() {
// @@protoc_insertion_point(field_add:google.protobuf.Field.options) // @@protoc_insertion_point(field_add:google.protobuf.Field.options)
return options_.Add(); return options_.Add();
} }
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
Field::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Field.options)
return options_;
}
::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
Field::mutable_options() { Field::mutable_options() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Field.options) // @@protoc_insertion_point(field_mutable_list:google.protobuf.Field.options)
return &options_; return &options_;
} }
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
Field::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Field.options)
return options_;
}
// optional string json_name = 10; // optional string json_name = 10;
void Field::clear_json_name() { void Field::clear_json_name() {
@ -1927,10 +1927,10 @@ bool Enum::MergePartialFromCodedStream(
if (tag == 10) { if (tag == 10) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString( DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name())); input, this->mutable_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::PARSE, ::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.Enum.name"); "google.protobuf.Enum.name"));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
@ -2026,9 +2026,9 @@ void Enum::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_start:google.protobuf.Enum) // @@protoc_insertion_point(serialize_start:google.protobuf.Enum)
// optional string name = 1; // optional string name = 1;
if (this->name().size() > 0) { if (this->name().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Enum.name"); "google.protobuf.Enum.name");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->name(), output); 1, this->name(), output);
@ -2066,9 +2066,9 @@ void Enum::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Enum) // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Enum)
// optional string name = 1; // optional string name = 1;
if (this->name().size() > 0) { if (this->name().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Enum.name"); "google.protobuf.Enum.name");
target = target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray( ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
@ -2271,28 +2271,28 @@ int Enum::enumvalue_size() const {
void Enum::clear_enumvalue() { void Enum::clear_enumvalue() {
enumvalue_.Clear(); enumvalue_.Clear();
} }
const ::google::protobuf::EnumValue& Enum::enumvalue(int index) const { const ::google::protobuf::EnumValue& Enum::enumvalue(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.Enum.enumvalue) // @@protoc_insertion_point(field_get:google.protobuf.Enum.enumvalue)
return enumvalue_.Get(index); return enumvalue_.Get(index);
} }
::google::protobuf::EnumValue* Enum::mutable_enumvalue(int index) { ::google::protobuf::EnumValue* Enum::mutable_enumvalue(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.Enum.enumvalue) // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.enumvalue)
return enumvalue_.Mutable(index); return enumvalue_.Mutable(index);
} }
::google::protobuf::EnumValue* Enum::add_enumvalue() { ::google::protobuf::EnumValue* Enum::add_enumvalue() {
// @@protoc_insertion_point(field_add:google.protobuf.Enum.enumvalue) // @@protoc_insertion_point(field_add:google.protobuf.Enum.enumvalue)
return enumvalue_.Add(); return enumvalue_.Add();
} }
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >& ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >*
Enum::enumvalue() const {
// @@protoc_insertion_point(field_list:google.protobuf.Enum.enumvalue)
return enumvalue_;
}
::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >*
Enum::mutable_enumvalue() { Enum::mutable_enumvalue() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.enumvalue) // @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.enumvalue)
return &enumvalue_; return &enumvalue_;
} }
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >&
Enum::enumvalue() const {
// @@protoc_insertion_point(field_list:google.protobuf.Enum.enumvalue)
return enumvalue_;
}
// repeated .google.protobuf.Option options = 3; // repeated .google.protobuf.Option options = 3;
int Enum::options_size() const { int Enum::options_size() const {
@ -2301,28 +2301,28 @@ int Enum::options_size() const {
void Enum::clear_options() { void Enum::clear_options() {
options_.Clear(); options_.Clear();
} }
const ::google::protobuf::Option& Enum::options(int index) const { const ::google::protobuf::Option& Enum::options(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.Enum.options) // @@protoc_insertion_point(field_get:google.protobuf.Enum.options)
return options_.Get(index); return options_.Get(index);
} }
::google::protobuf::Option* Enum::mutable_options(int index) { ::google::protobuf::Option* Enum::mutable_options(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.Enum.options) // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.options)
return options_.Mutable(index); return options_.Mutable(index);
} }
::google::protobuf::Option* Enum::add_options() { ::google::protobuf::Option* Enum::add_options() {
// @@protoc_insertion_point(field_add:google.protobuf.Enum.options) // @@protoc_insertion_point(field_add:google.protobuf.Enum.options)
return options_.Add(); return options_.Add();
} }
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
Enum::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Enum.options)
return options_;
}
::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
Enum::mutable_options() { Enum::mutable_options() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.options) // @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.options)
return &options_; return &options_;
} }
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
Enum::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Enum.options)
return options_;
}
// optional .google.protobuf.SourceContext source_context = 4; // optional .google.protobuf.SourceContext source_context = 4;
bool Enum::has_source_context() const { bool Enum::has_source_context() const {
@ -2332,11 +2332,11 @@ void Enum::clear_source_context() {
if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_; if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_;
source_context_ = NULL; source_context_ = NULL;
} }
const ::google::protobuf::SourceContext& Enum::source_context() const { const ::google::protobuf::SourceContext& Enum::source_context() const {
// @@protoc_insertion_point(field_get:google.protobuf.Enum.source_context) // @@protoc_insertion_point(field_get:google.protobuf.Enum.source_context)
return source_context_ != NULL ? *source_context_ : *default_instance_->source_context_; return source_context_ != NULL ? *source_context_ : *default_instance_->source_context_;
} }
::google::protobuf::SourceContext* Enum::mutable_source_context() { ::google::protobuf::SourceContext* Enum::mutable_source_context() {
if (source_context_ == NULL) { if (source_context_ == NULL) {
source_context_ = new ::google::protobuf::SourceContext; source_context_ = new ::google::protobuf::SourceContext;
@ -2344,13 +2344,13 @@ void Enum::clear_source_context() {
// @@protoc_insertion_point(field_mutable:google.protobuf.Enum.source_context) // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.source_context)
return source_context_; return source_context_;
} }
::google::protobuf::SourceContext* Enum::release_source_context() { ::google::protobuf::SourceContext* Enum::release_source_context() {
::google::protobuf::SourceContext* temp = source_context_; ::google::protobuf::SourceContext* temp = source_context_;
source_context_ = NULL; source_context_ = NULL;
return temp; return temp;
} }
void Enum::set_allocated_source_context(::google::protobuf::SourceContext* source_context) { void Enum::set_allocated_source_context(::google::protobuf::SourceContext* source_context) {
delete source_context_; delete source_context_;
source_context_ = source_context; source_context_ = source_context;
if (source_context) { if (source_context) {
@ -2468,10 +2468,10 @@ bool EnumValue::MergePartialFromCodedStream(
if (tag == 10) { if (tag == 10) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString( DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name())); input, this->mutable_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::PARSE, ::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.EnumValue.name"); "google.protobuf.EnumValue.name"));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
@ -2537,9 +2537,9 @@ void EnumValue::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_start:google.protobuf.EnumValue) // @@protoc_insertion_point(serialize_start:google.protobuf.EnumValue)
// optional string name = 1; // optional string name = 1;
if (this->name().size() > 0) { if (this->name().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.EnumValue.name"); "google.protobuf.EnumValue.name");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->name(), output); 1, this->name(), output);
@ -2564,9 +2564,9 @@ void EnumValue::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValue) // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValue)
// optional string name = 1; // optional string name = 1;
if (this->name().size() > 0) { if (this->name().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.EnumValue.name"); "google.protobuf.EnumValue.name");
target = target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray( ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
@ -2748,28 +2748,28 @@ int EnumValue::options_size() const {
void EnumValue::clear_options() { void EnumValue::clear_options() {
options_.Clear(); options_.Clear();
} }
const ::google::protobuf::Option& EnumValue::options(int index) const { const ::google::protobuf::Option& EnumValue::options(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumValue.options) // @@protoc_insertion_point(field_get:google.protobuf.EnumValue.options)
return options_.Get(index); return options_.Get(index);
} }
::google::protobuf::Option* EnumValue::mutable_options(int index) { ::google::protobuf::Option* EnumValue::mutable_options(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.EnumValue.options) // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValue.options)
return options_.Mutable(index); return options_.Mutable(index);
} }
::google::protobuf::Option* EnumValue::add_options() { ::google::protobuf::Option* EnumValue::add_options() {
// @@protoc_insertion_point(field_add:google.protobuf.EnumValue.options) // @@protoc_insertion_point(field_add:google.protobuf.EnumValue.options)
return options_.Add(); return options_.Add();
} }
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
EnumValue::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.EnumValue.options)
return options_;
}
::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
EnumValue::mutable_options() { EnumValue::mutable_options() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumValue.options) // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumValue.options)
return &options_; return &options_;
} }
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
EnumValue::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.EnumValue.options)
return options_;
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS #endif // PROTOBUF_INLINE_NOT_IN_HEADERS
@ -2865,10 +2865,10 @@ bool Option::MergePartialFromCodedStream(
if (tag == 10) { if (tag == 10) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString( DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name())); input, this->mutable_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::PARSE, ::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.Option.name"); "google.protobuf.Option.name"));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
@ -2915,9 +2915,9 @@ void Option::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_start:google.protobuf.Option) // @@protoc_insertion_point(serialize_start:google.protobuf.Option)
// optional string name = 1; // optional string name = 1;
if (this->name().size() > 0) { if (this->name().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Option.name"); "google.protobuf.Option.name");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->name(), output); 1, this->name(), output);
@ -2937,9 +2937,9 @@ void Option::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Option) // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Option)
// optional string name = 1; // optional string name = 1;
if (this->name().size() > 0) { if (this->name().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), this->name().length(), this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Option.name"); "google.protobuf.Option.name");
target = target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray( ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
@ -3093,11 +3093,11 @@ void Option::clear_value() {
if (GetArenaNoVirtual() == NULL && value_ != NULL) delete value_; if (GetArenaNoVirtual() == NULL && value_ != NULL) delete value_;
value_ = NULL; value_ = NULL;
} }
const ::google::protobuf::Any& Option::value() const { const ::google::protobuf::Any& Option::value() const {
// @@protoc_insertion_point(field_get:google.protobuf.Option.value) // @@protoc_insertion_point(field_get:google.protobuf.Option.value)
return value_ != NULL ? *value_ : *default_instance_->value_; return value_ != NULL ? *value_ : *default_instance_->value_;
} }
::google::protobuf::Any* Option::mutable_value() { ::google::protobuf::Any* Option::mutable_value() {
if (value_ == NULL) { if (value_ == NULL) {
value_ = new ::google::protobuf::Any; value_ = new ::google::protobuf::Any;
@ -3105,13 +3105,13 @@ void Option::clear_value() {
// @@protoc_insertion_point(field_mutable:google.protobuf.Option.value) // @@protoc_insertion_point(field_mutable:google.protobuf.Option.value)
return value_; return value_;
} }
::google::protobuf::Any* Option::release_value() { ::google::protobuf::Any* Option::release_value() {
::google::protobuf::Any* temp = value_; ::google::protobuf::Any* temp = value_;
value_ = NULL; value_ = NULL;
return temp; return temp;
} }
void Option::set_allocated_value(::google::protobuf::Any* value) { void Option::set_allocated_value(::google::protobuf::Any* value) {
delete value_; delete value_;
value_ = value; value_ = value;
if (value) { if (value) {

@ -40,11 +40,11 @@ void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto();
void protobuf_AssignDesc_google_2fprotobuf_2ftype_2eproto(); void protobuf_AssignDesc_google_2fprotobuf_2ftype_2eproto();
void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto(); void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto();
class Type;
class Field;
class Enum; class Enum;
class EnumValue; class EnumValue;
class Field;
class Option; class Option;
class Type;
enum Field_Kind { enum Field_Kind {
Field_Kind_TYPE_UNKNOWN = 0, Field_Kind_TYPE_UNKNOWN = 0,
@ -204,10 +204,10 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message {
const ::google::protobuf::Field& fields(int index) const; const ::google::protobuf::Field& fields(int index) const;
::google::protobuf::Field* mutable_fields(int index); ::google::protobuf::Field* mutable_fields(int index);
::google::protobuf::Field* add_fields(); ::google::protobuf::Field* add_fields();
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >&
fields() const;
::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >* ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >*
mutable_fields(); mutable_fields();
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >&
fields() const;
// repeated string oneofs = 3; // repeated string oneofs = 3;
int oneofs_size() const; int oneofs_size() const;
@ -232,10 +232,10 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message {
const ::google::protobuf::Option& options(int index) const; const ::google::protobuf::Option& options(int index) const;
::google::protobuf::Option* mutable_options(int index); ::google::protobuf::Option* mutable_options(int index);
::google::protobuf::Option* add_options(); ::google::protobuf::Option* add_options();
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
options() const;
::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
mutable_options(); mutable_options();
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
options() const;
// optional .google.protobuf.SourceContext source_context = 5; // optional .google.protobuf.SourceContext source_context = 5;
bool has_source_context() const; bool has_source_context() const;
@ -455,10 +455,10 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message {
const ::google::protobuf::Option& options(int index) const; const ::google::protobuf::Option& options(int index) const;
::google::protobuf::Option* mutable_options(int index); ::google::protobuf::Option* mutable_options(int index);
::google::protobuf::Option* add_options(); ::google::protobuf::Option* add_options();
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
options() const;
::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
mutable_options(); mutable_options();
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
options() const;
// optional string json_name = 10; // optional string json_name = 10;
void clear_json_name(); void clear_json_name();
@ -569,10 +569,10 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message {
const ::google::protobuf::EnumValue& enumvalue(int index) const; const ::google::protobuf::EnumValue& enumvalue(int index) const;
::google::protobuf::EnumValue* mutable_enumvalue(int index); ::google::protobuf::EnumValue* mutable_enumvalue(int index);
::google::protobuf::EnumValue* add_enumvalue(); ::google::protobuf::EnumValue* add_enumvalue();
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >&
enumvalue() const;
::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >* ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >*
mutable_enumvalue(); mutable_enumvalue();
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >&
enumvalue() const;
// repeated .google.protobuf.Option options = 3; // repeated .google.protobuf.Option options = 3;
int options_size() const; int options_size() const;
@ -581,10 +581,10 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message {
const ::google::protobuf::Option& options(int index) const; const ::google::protobuf::Option& options(int index) const;
::google::protobuf::Option* mutable_options(int index); ::google::protobuf::Option* mutable_options(int index);
::google::protobuf::Option* add_options(); ::google::protobuf::Option* add_options();
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
options() const;
::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
mutable_options(); mutable_options();
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
options() const;
// optional .google.protobuf.SourceContext source_context = 4; // optional .google.protobuf.SourceContext source_context = 4;
bool has_source_context() const; bool has_source_context() const;
@ -701,10 +701,10 @@ class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message {
const ::google::protobuf::Option& options(int index) const; const ::google::protobuf::Option& options(int index) const;
::google::protobuf::Option* mutable_options(int index); ::google::protobuf::Option* mutable_options(int index);
::google::protobuf::Option* add_options(); ::google::protobuf::Option* add_options();
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
options() const;
::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
mutable_options(); mutable_options();
const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
options() const;
// @@protoc_insertion_point(class_scope:google.protobuf.EnumValue) // @@protoc_insertion_point(class_scope:google.protobuf.EnumValue)
private: private:
@ -885,16 +885,16 @@ inline ::google::protobuf::Field* Type::add_fields() {
// @@protoc_insertion_point(field_add:google.protobuf.Type.fields) // @@protoc_insertion_point(field_add:google.protobuf.Type.fields)
return fields_.Add(); return fields_.Add();
} }
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >&
Type::fields() const {
// @@protoc_insertion_point(field_list:google.protobuf.Type.fields)
return fields_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >* inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >*
Type::mutable_fields() { Type::mutable_fields() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.fields) // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.fields)
return &fields_; return &fields_;
} }
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >&
Type::fields() const {
// @@protoc_insertion_point(field_list:google.protobuf.Type.fields)
return fields_;
}
// repeated string oneofs = 3; // repeated string oneofs = 3;
inline int Type::oneofs_size() const { inline int Type::oneofs_size() const {
@ -969,16 +969,16 @@ inline ::google::protobuf::Option* Type::add_options() {
// @@protoc_insertion_point(field_add:google.protobuf.Type.options) // @@protoc_insertion_point(field_add:google.protobuf.Type.options)
return options_.Add(); return options_.Add();
} }
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
Type::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Type.options)
return options_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
Type::mutable_options() { Type::mutable_options() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.options) // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.options)
return &options_; return &options_;
} }
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
Type::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Type.options)
return options_;
}
// optional .google.protobuf.SourceContext source_context = 5; // optional .google.protobuf.SourceContext source_context = 5;
inline bool Type::has_source_context() const { inline bool Type::has_source_context() const {
@ -1210,16 +1210,16 @@ inline ::google::protobuf::Option* Field::add_options() {
// @@protoc_insertion_point(field_add:google.protobuf.Field.options) // @@protoc_insertion_point(field_add:google.protobuf.Field.options)
return options_.Add(); return options_.Add();
} }
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
Field::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Field.options)
return options_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
Field::mutable_options() { Field::mutable_options() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Field.options) // @@protoc_insertion_point(field_mutable_list:google.protobuf.Field.options)
return &options_; return &options_;
} }
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
Field::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Field.options)
return options_;
}
// optional string json_name = 10; // optional string json_name = 10;
inline void Field::clear_json_name() { inline void Field::clear_json_name() {
@ -1330,16 +1330,16 @@ inline ::google::protobuf::EnumValue* Enum::add_enumvalue() {
// @@protoc_insertion_point(field_add:google.protobuf.Enum.enumvalue) // @@protoc_insertion_point(field_add:google.protobuf.Enum.enumvalue)
return enumvalue_.Add(); return enumvalue_.Add();
} }
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >&
Enum::enumvalue() const {
// @@protoc_insertion_point(field_list:google.protobuf.Enum.enumvalue)
return enumvalue_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >* inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >*
Enum::mutable_enumvalue() { Enum::mutable_enumvalue() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.enumvalue) // @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.enumvalue)
return &enumvalue_; return &enumvalue_;
} }
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >&
Enum::enumvalue() const {
// @@protoc_insertion_point(field_list:google.protobuf.Enum.enumvalue)
return enumvalue_;
}
// repeated .google.protobuf.Option options = 3; // repeated .google.protobuf.Option options = 3;
inline int Enum::options_size() const { inline int Enum::options_size() const {
@ -1360,16 +1360,16 @@ inline ::google::protobuf::Option* Enum::add_options() {
// @@protoc_insertion_point(field_add:google.protobuf.Enum.options) // @@protoc_insertion_point(field_add:google.protobuf.Enum.options)
return options_.Add(); return options_.Add();
} }
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
Enum::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Enum.options)
return options_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
Enum::mutable_options() { Enum::mutable_options() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.options) // @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.options)
return &options_; return &options_;
} }
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
Enum::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Enum.options)
return options_;
}
// optional .google.protobuf.SourceContext source_context = 4; // optional .google.protobuf.SourceContext source_context = 4;
inline bool Enum::has_source_context() const { inline bool Enum::has_source_context() const {
@ -1502,16 +1502,16 @@ inline ::google::protobuf::Option* EnumValue::add_options() {
// @@protoc_insertion_point(field_add:google.protobuf.EnumValue.options) // @@protoc_insertion_point(field_add:google.protobuf.EnumValue.options)
return options_.Add(); return options_.Add();
} }
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
EnumValue::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.EnumValue.options)
return options_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
EnumValue::mutable_options() { EnumValue::mutable_options() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumValue.options) // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumValue.options)
return &options_; return &options_;
} }
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
EnumValue::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.EnumValue.options)
return options_;
}
// ------------------------------------------------------------------- // -------------------------------------------------------------------

@ -193,13 +193,13 @@ class LIBPROTOBUF_EXPORT DataPiece {
// Stored piece of data. // Stored piece of data.
union { union {
const int32 i32_; int32 i32_;
const int64 i64_; int64 i64_;
const uint32 u32_; uint32 u32_;
const uint64 u64_; uint64 u64_;
const double double_; double double_;
const float float_; float float_;
const bool bool_; bool bool_;
StringPiecePod str_; StringPiecePod str_;
}; };
}; };

@ -57,7 +57,7 @@ namespace converter {
// ObjectWriter when EndObject() is called on the root object. It also writes // ObjectWriter when EndObject() is called on the root object. It also writes
// out all non-repeated primitive fields that haven't been explicitly rendered // out all non-repeated primitive fields that haven't been explicitly rendered
// with their default values (0 for numbers, "" for strings, etc). // with their default values (0 for numbers, "" for strings, etc).
class DefaultValueObjectWriter : public ObjectWriter { class LIBPROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter {
public: public:
DefaultValueObjectWriter(TypeResolver* type_resolver, DefaultValueObjectWriter(TypeResolver* type_resolver,
const google::protobuf::Type& type, const google::protobuf::Type& type,

@ -37,6 +37,7 @@
#include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/common.h>
#include <google/protobuf/util/internal/utility.h> #include <google/protobuf/util/internal/utility.h>
#include <google/protobuf/util/internal/json_escaping.h> #include <google/protobuf/util/internal/json_escaping.h>
#include <google/protobuf/stubs/mathlimits.h>
#include <google/protobuf/stubs/strutil.h> #include <google/protobuf/stubs/strutil.h>
namespace google { namespace google {
@ -115,7 +116,9 @@ JsonObjectWriter* JsonObjectWriter::RenderUint64(StringPiece name,
JsonObjectWriter* JsonObjectWriter::RenderDouble(StringPiece name, JsonObjectWriter* JsonObjectWriter::RenderDouble(StringPiece name,
double value) { double value) {
if (isfinite(value)) return RenderSimple(name, SimpleDtoa(value)); if (google::protobuf::MathLimits<double>::IsFinite(value)) {
return RenderSimple(name, SimpleDtoa(value));
}
// Render quoted with NaN/Infinity-aware DoubleAsString. // Render quoted with NaN/Infinity-aware DoubleAsString.
return RenderString(name, DoubleAsString(value)); return RenderString(name, DoubleAsString(value));
@ -123,7 +126,9 @@ JsonObjectWriter* JsonObjectWriter::RenderDouble(StringPiece name,
JsonObjectWriter* JsonObjectWriter::RenderFloat(StringPiece name, JsonObjectWriter* JsonObjectWriter::RenderFloat(StringPiece name,
float value) { float value) {
if (isfinite(value)) return RenderSimple(name, SimpleFtoa(value)); if (google::protobuf::MathLimits<float>::IsFinite(value)) {
return RenderSimple(name, SimpleFtoa(value));
}
// Render quoted with NaN/Infinity-aware FloatAsString. // Render quoted with NaN/Infinity-aware FloatAsString.
return RenderString(name, FloatAsString(value)); return RenderString(name, FloatAsString(value));

@ -44,7 +44,7 @@ namespace util {
namespace converter { namespace converter {
// Internal helper class for type resolving. Note that this class is not // Internal helper class for type resolving. Note that this class is not
// thread-safe and should only be accessed in one thread. // thread-safe and should only be accessed in one thread.
class TypeInfo { class LIBPROTOBUF_EXPORT TypeInfo {
public: public:
TypeInfo() {} TypeInfo() {}
virtual ~TypeInfo() {} virtual ~TypeInfo() {}

@ -311,7 +311,7 @@ string DoubleAsString(double value) {
} }
string FloatAsString(float value) { string FloatAsString(float value) {
if (isfinite(value)) return SimpleFtoa(value); if (google::protobuf::MathLimits<float>::IsFinite(value)) return SimpleFtoa(value);
return DoubleAsString(value); return DoubleAsString(value);
} }

@ -80,7 +80,7 @@ inline util::Status BinaryToJsonStream(
JsonOptions()); JsonOptions());
} }
util::Status BinaryToJsonString( LIBPROTOBUF_EXPORT util::Status BinaryToJsonString(
TypeResolver* resolver, TypeResolver* resolver,
const string& type_url, const string& type_url,
const string& binary_input, const string& binary_input,
@ -107,7 +107,7 @@ util::Status JsonToBinaryStream(
io::ZeroCopyInputStream* json_input, io::ZeroCopyInputStream* json_input,
io::ZeroCopyOutputStream* binary_output); io::ZeroCopyOutputStream* binary_output);
util::Status JsonToBinaryString( LIBPROTOBUF_EXPORT util::Status JsonToBinaryString(
TypeResolver* resolver, TypeResolver* resolver,
const string& type_url, const string& type_url,
const string& json_input, const string& json_input,

@ -31,13 +31,17 @@
#ifndef GOOGLE_PROTOBUF_UTIL_TIME_UTIL_H__ #ifndef GOOGLE_PROTOBUF_UTIL_TIME_UTIL_H__
#define GOOGLE_PROTOBUF_UTIL_TIME_UTIL_H__ #define GOOGLE_PROTOBUF_UTIL_TIME_UTIL_H__
#include <sys/time.h>
#include <ctime> #include <ctime>
#include <ostream> #include <ostream>
#include <string> #include <string>
#ifdef _MSC_VER
#include <winsock2.h>
#else
#include <sys/time.h>
#endif
#include <google/protobuf/duration.pb.h> #include <google/protobuf/duration.pb.h>
#include <google/protobuf/stubs/port.h>
#include <google/protobuf/timestamp.pb.h> #include <google/protobuf/timestamp.pb.h>
namespace google { namespace google {
@ -85,6 +89,9 @@ class LIBPROTOBUF_EXPORT TimeUtil {
static string ToString(const Duration& duration); static string ToString(const Duration& duration);
static bool FromString(const string& value, Duration* timestamp); static bool FromString(const string& value, Duration* timestamp);
#ifdef GetCurrentTime
#undef GetCurrentTime // Visual Studio has macro GetCurrentTime
#endif
// Gets the current UTC time. // Gets the current UTC time.
static Timestamp GetCurrentTime(); static Timestamp GetCurrentTime();
// Returns the Time representing "1970-01-01 00:00:00". // Returns the Time representing "1970-01-01 00:00:00".
@ -153,12 +160,12 @@ namespace protobuf {
// Overloaded operators for Duration. // Overloaded operators for Duration.
// //
// Assignment operators. // Assignment operators.
Duration& operator+=(Duration& d1, const Duration& d2); // NOLINT LIBPROTOBUF_EXPORT Duration& operator+=(Duration& d1, const Duration& d2); // NOLINT
Duration& operator-=(Duration& d1, const Duration& d2); // NOLINT LIBPROTOBUF_EXPORT Duration& operator-=(Duration& d1, const Duration& d2); // NOLINT
Duration& operator*=(Duration& d, int64 r); // NOLINT LIBPROTOBUF_EXPORT Duration& operator*=(Duration& d, int64 r); // NOLINT
Duration& operator*=(Duration& d, double r); // NOLINT LIBPROTOBUF_EXPORT Duration& operator*=(Duration& d, double r); // NOLINT
Duration& operator/=(Duration& d, int64 r); // NOLINT LIBPROTOBUF_EXPORT Duration& operator/=(Duration& d, int64 r); // NOLINT
Duration& operator/=(Duration& d, double r); // NOLINT LIBPROTOBUF_EXPORT Duration& operator/=(Duration& d, double r); // NOLINT
// Overload for other integer types. // Overload for other integer types.
template <typename T> template <typename T>
Duration& operator*=(Duration& d, T r) { // NOLINT Duration& operator*=(Duration& d, T r) { // NOLINT
@ -170,7 +177,7 @@ Duration& operator/=(Duration& d, T r) { // NOLINT
int64 x = r; int64 x = r;
return d /= x; return d /= x;
} }
Duration& operator%=(Duration& d1, const Duration& d2); // NOLINT LIBPROTOBUF_EXPORT Duration& operator%=(Duration& d1, const Duration& d2); // NOLINT
// Relational operators. // Relational operators.
inline bool operator<(const Duration& d1, const Duration& d2) { inline bool operator<(const Duration& d1, const Duration& d2) {
if (d1.seconds() == d2.seconds()) { if (d1.seconds() == d2.seconds()) {
@ -221,7 +228,7 @@ template<typename T>
inline Duration operator/(Duration d, T r) { inline Duration operator/(Duration d, T r) {
return d /= r; return d /= r;
} }
int64 operator/(const Duration& d1, const Duration& d2); LIBPROTOBUF_EXPORT int64 operator/(const Duration& d1, const Duration& d2);
inline Duration operator%(const Duration& d1, const Duration& d2) { inline Duration operator%(const Duration& d1, const Duration& d2) {
Duration result = d1; Duration result = d1;
@ -236,7 +243,9 @@ inline ostream& operator<<(ostream& out, const Duration& d) {
// Overloaded operators for Timestamp // Overloaded operators for Timestamp
// //
// Assignement operators. // Assignement operators.
LIBPROTOBUF_EXPORT
Timestamp& operator+=(Timestamp& t, const Duration& d); // NOLINT Timestamp& operator+=(Timestamp& t, const Duration& d); // NOLINT
LIBPROTOBUF_EXPORT
Timestamp& operator-=(Timestamp& t, const Duration& d); // NOLINT Timestamp& operator-=(Timestamp& t, const Duration& d); // NOLINT
// Relational operators. // Relational operators.
inline bool operator<(const Timestamp& t1, const Timestamp& t2) { inline bool operator<(const Timestamp& t1, const Timestamp& t2) {
@ -273,7 +282,7 @@ inline Timestamp operator-(const Timestamp& t, const Duration& d) {
Timestamp result = t; Timestamp result = t;
return result -= d; return result -= d;
} }
Duration operator-(const Timestamp& t1, const Timestamp& t2); LIBPROTOBUF_EXPORT Duration operator-(const Timestamp& t1, const Timestamp& t2);
inline ostream& operator<<(ostream& out, const Timestamp& t) { inline ostream& operator<<(ostream& out, const Timestamp& t) {
out << google::protobuf::util::TimeUtil::ToString(t); out << google::protobuf::util::TimeUtil::ToString(t);

@ -42,7 +42,7 @@ class TypeResolver;
// Creates a TypeResolver that serves type information in the given descriptor // Creates a TypeResolver that serves type information in the given descriptor
// pool. Caller takes ownership of the returned TypeResolver. // pool. Caller takes ownership of the returned TypeResolver.
TypeResolver* NewTypeResolverForDescriptorPool( LIBPROTOBUF_EXPORT TypeResolver* NewTypeResolverForDescriptorPool(
const string& url_prefix, const DescriptorPool* pool); const string& url_prefix, const DescriptorPool* pool);
} // namespace util } // namespace util

@ -1968,10 +1968,10 @@ bool StringValue::MergePartialFromCodedStream(
if (tag == 10) { if (tag == 10) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString( DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_value())); input, this->mutable_value()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->value().data(), this->value().length(), this->value().data(), this->value().length(),
::google::protobuf::internal::WireFormat::PARSE, ::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.StringValue.value"); "google.protobuf.StringValue.value"));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
@ -2005,9 +2005,9 @@ void StringValue::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_start:google.protobuf.StringValue) // @@protoc_insertion_point(serialize_start:google.protobuf.StringValue)
// optional string value = 1; // optional string value = 1;
if (this->value().size() > 0) { if (this->value().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->value().data(), this->value().length(), this->value().data(), this->value().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.StringValue.value"); "google.protobuf.StringValue.value");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->value(), output); 1, this->value(), output);
@ -2021,9 +2021,9 @@ void StringValue::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.StringValue) // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.StringValue)
// optional string value = 1; // optional string value = 1;
if (this->value().size() > 0) { if (this->value().size() > 0) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->value().data(), this->value().length(), this->value().data(), this->value().length(),
::google::protobuf::internal::WireFormat::SERIALIZE, ::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.StringValue.value"); "google.protobuf.StringValue.value");
target = target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray( ::google::protobuf::internal::WireFormatLite::WriteStringToArray(

@ -37,15 +37,15 @@ void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fwrappers_2eproto();
void protobuf_AssignDesc_google_2fprotobuf_2fwrappers_2eproto(); void protobuf_AssignDesc_google_2fprotobuf_2fwrappers_2eproto();
void protobuf_ShutdownFile_google_2fprotobuf_2fwrappers_2eproto(); void protobuf_ShutdownFile_google_2fprotobuf_2fwrappers_2eproto();
class BoolValue;
class BytesValue;
class DoubleValue; class DoubleValue;
class FloatValue; class FloatValue;
class Int64Value;
class UInt64Value;
class Int32Value; class Int32Value;
class UInt32Value; class Int64Value;
class BoolValue;
class StringValue; class StringValue;
class BytesValue; class UInt32Value;
class UInt64Value;
// =================================================================== // ===================================================================

@ -27,6 +27,10 @@ get_source_files() {
get_variable_value $@ | grep "cc$" get_variable_value $@ | grep "cc$"
} }
get_proto_files_blacklisted() {
get_proto_files $@ | sed '/^google\/protobuf\/unittest_enormous_descriptor.proto$/d'
}
get_proto_files() { get_proto_files() {
get_variable_value $@ | grep "pb.cc$" | sed "s/pb.cc/proto/" get_variable_value $@ | grep "pb.cc$" | sed "s/pb.cc/proto/"
} }
@ -53,6 +57,7 @@ LIBPROTOBUF_SOURCES=$(get_source_files $MAKEFILE libprotobuf_la_SOURCES)
LIBPROTOC_SOURCES=$(get_source_files $MAKEFILE libprotoc_la_SOURCES) LIBPROTOC_SOURCES=$(get_source_files $MAKEFILE libprotoc_la_SOURCES)
LITE_PROTOS=$(get_proto_files $MAKEFILE protoc_lite_outputs) LITE_PROTOS=$(get_proto_files $MAKEFILE protoc_lite_outputs)
PROTOS=$(get_proto_files $MAKEFILE protoc_outputs) PROTOS=$(get_proto_files $MAKEFILE protoc_outputs)
PROTOS_BLACKLISTED=$(get_proto_files_blacklisted $MAKEFILE protoc_outputs)
WKT_PROTOS=$(get_variable_value $MAKEFILE nobase_dist_proto_DATA) WKT_PROTOS=$(get_variable_value $MAKEFILE nobase_dist_proto_DATA)
COMMON_TEST_SOURCES=$(get_source_files $MAKEFILE COMMON_TEST_SOURCES) COMMON_TEST_SOURCES=$(get_source_files $MAKEFILE COMMON_TEST_SOURCES)
COMMON_LITE_TEST_SOURCES=$(get_source_files $MAKEFILE COMMON_LITE_TEST_SOURCES) COMMON_LITE_TEST_SOURCES=$(get_source_files $MAKEFILE COMMON_LITE_TEST_SOURCES)
@ -112,7 +117,7 @@ set_cmake_value $CMAKE_DIR/libprotobuf-lite.cmake libprotobuf_lite_files $CMAKE_
set_cmake_value $CMAKE_DIR/libprotobuf.cmake libprotobuf_files $CMAKE_PREFIX $LIBPROTOBUF_SOURCES set_cmake_value $CMAKE_DIR/libprotobuf.cmake libprotobuf_files $CMAKE_PREFIX $LIBPROTOBUF_SOURCES
set_cmake_value $CMAKE_DIR/libprotoc.cmake libprotoc_files $CMAKE_PREFIX $LIBPROTOC_SOURCES set_cmake_value $CMAKE_DIR/libprotoc.cmake libprotoc_files $CMAKE_PREFIX $LIBPROTOC_SOURCES
set_cmake_value $CMAKE_DIR/tests.cmake lite_test_protos "" $LITE_PROTOS set_cmake_value $CMAKE_DIR/tests.cmake lite_test_protos "" $LITE_PROTOS
set_cmake_value $CMAKE_DIR/tests.cmake tests_protos "" $PROTOS set_cmake_value $CMAKE_DIR/tests.cmake tests_protos "" $PROTOS_BLACKLISTED
set_cmake_value $CMAKE_DIR/tests.cmake common_test_files $CMAKE_PREFIX $COMMON_TEST_SOURCES set_cmake_value $CMAKE_DIR/tests.cmake common_test_files $CMAKE_PREFIX $COMMON_TEST_SOURCES
set_cmake_value $CMAKE_DIR/tests.cmake common_lite_test_files $CMAKE_PREFIX $COMMON_LITE_TEST_SOURCES set_cmake_value $CMAKE_DIR/tests.cmake common_lite_test_files $CMAKE_PREFIX $COMMON_LITE_TEST_SOURCES
set_cmake_value $CMAKE_DIR/tests.cmake tests_files $CMAKE_PREFIX $TEST_SOURCES set_cmake_value $CMAKE_DIR/tests.cmake tests_files $CMAKE_PREFIX $TEST_SOURCES

Loading…
Cancel
Save