Merge branch '3.7.x' into merge-3-7-x

pull/5953/head
Adam Cozzette 6 years ago
commit 8645d893ab
  1. 2
      Protobuf.podspec
  2. 10
      WORKSPACE
  3. 1
      cmake/extract_includes.bat.in
  4. 8
      configure.ac
  5. 48
      conformance/binary_json_conformance_suite.cc
  6. 2
      conformance/failure_list_php.txt
  7. 2
      csharp/Google.Protobuf.Tools.nuspec
  8. 123
      csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs
  9. BIN
      csharp/src/Google.Protobuf.Test/testprotos.pb
  10. 2
      csharp/src/Google.Protobuf/Google.Protobuf.csproj
  11. 2
      java/bom/pom.xml
  12. 2
      java/core/pom.xml
  13. 2
      java/pom.xml
  14. 2
      java/util/pom.xml
  15. 2
      js/package.json
  16. 2
      kokoro/macos/prepare_build_macos_rc
  17. 22
      php/ext/google/protobuf/package.xml
  18. 2
      php/ext/google/protobuf/protobuf.h
  19. 540
      php/ext/google/protobuf/upb.c
  20. 197
      php/ext/google/protobuf/upb.h
  21. 1
      php/src/Google/Protobuf/Internal/DescriptorProto.php
  22. 1
      php/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php
  23. 1
      php/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php
  24. 1
      php/src/Google/Protobuf/Internal/EnumDescriptorProto.php
  25. 1
      php/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php
  26. 1
      php/src/Google/Protobuf/Internal/EnumOptions.php
  27. 1
      php/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php
  28. 1
      php/src/Google/Protobuf/Internal/EnumValueOptions.php
  29. 1
      php/src/Google/Protobuf/Internal/ExtensionRangeOptions.php
  30. 1
      php/src/Google/Protobuf/Internal/FieldDescriptorProto.php
  31. 1
      php/src/Google/Protobuf/Internal/FieldOptions.php
  32. 1
      php/src/Google/Protobuf/Internal/FileDescriptorProto.php
  33. 1
      php/src/Google/Protobuf/Internal/FileDescriptorSet.php
  34. 1
      php/src/Google/Protobuf/Internal/FileOptions.php
  35. 1
      php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php
  36. 1
      php/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php
  37. 1
      php/src/Google/Protobuf/Internal/MessageOptions.php
  38. 1
      php/src/Google/Protobuf/Internal/MethodDescriptorProto.php
  39. 1
      php/src/Google/Protobuf/Internal/MethodOptions.php
  40. 1
      php/src/Google/Protobuf/Internal/OneofDescriptorProto.php
  41. 1
      php/src/Google/Protobuf/Internal/OneofOptions.php
  42. 1
      php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php
  43. 1
      php/src/Google/Protobuf/Internal/ServiceOptions.php
  44. 1
      php/src/Google/Protobuf/Internal/SourceCodeInfo.php
  45. 1
      php/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php
  46. 1
      php/src/Google/Protobuf/Internal/UninterpretedOption.php
  47. 1
      php/src/Google/Protobuf/Internal/UninterpretedOption/NamePart.php
  48. 17
      php/tests/encode_decode_test.php
  49. 1
      php/tests/proto/test.proto
  50. 4
      protoc-artifacts/build-protoc.sh
  51. 2
      protoc-artifacts/pom.xml
  52. 2
      python/google/protobuf/__init__.py
  53. 37
      ruby/ext/google/protobuf_c/encode_decode.c
  54. 9907
      ruby/ext/google/protobuf_c/upb.c
  55. 13209
      ruby/ext/google/protobuf_c/upb.h
  56. 2
      ruby/google-protobuf.gemspec
  57. 5
      ruby/travis-test.sh
  58. 4
      src/Makefile.am
  59. 4
      src/google/protobuf/any.pb.h
  60. 8
      src/google/protobuf/api.pb.h
  61. 2
      src/google/protobuf/compiler/cpp/cpp_message.cc
  62. 6
      src/google/protobuf/compiler/php/php_generator.cc
  63. 10
      src/google/protobuf/compiler/plugin.pb.h
  64. 56
      src/google/protobuf/descriptor.pb.h
  65. 4
      src/google/protobuf/duration.pb.h
  66. 4
      src/google/protobuf/empty.pb.h
  67. 4
      src/google/protobuf/field_mask.pb.h
  68. 6
      src/google/protobuf/port_def.inc
  69. 1
      src/google/protobuf/port_undef.inc
  70. 4
      src/google/protobuf/source_context.pb.h
  71. 8
      src/google/protobuf/struct.pb.h
  72. 6
      src/google/protobuf/stubs/common.h
  73. 1
      src/google/protobuf/test_messages_proto3.proto
  74. 4
      src/google/protobuf/timestamp.pb.h
  75. 12
      src/google/protobuf/type.pb.h
  76. 20
      src/google/protobuf/wrappers.pb.h
  77. 4
      tests.sh
  78. 29
      update_version.py

@ -5,7 +5,7 @@
# dependent projects use the :git notation to refer to the library. # dependent projects use the :git notation to refer to the library.
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'Protobuf' s.name = 'Protobuf'
s.version = '3.7.0' s.version = '3.7.1'
s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.' s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.'
s.homepage = 'https://github.com/protocolbuffers/protobuf' s.homepage = 'https://github.com/protocolbuffers/protobuf'
s.license = '3-Clause BSD License' s.license = '3-Clause BSD License'

@ -75,3 +75,13 @@ bind(
name = "error_prone_annotations", name = "error_prone_annotations",
actual = "@error_prone_annotations_maven//jar", actual = "@error_prone_annotations_maven//jar",
) )
maven_jar(
name = "error_prone_annotations_maven",
artifact = "com.google.errorprone:error_prone_annotations:2.3.2",
)
bind(
name = "error_prone_annotations",
actual = "@error_prone_annotations_maven//jar",
)

@ -89,6 +89,7 @@ copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\casts.h" includ
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\common.h" include\google\protobuf\stubs\common.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\common.h" include\google\protobuf\stubs\common.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\fastmem.h" include\google\protobuf\stubs\fastmem.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\fastmem.h" include\google\protobuf\stubs\fastmem.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\hash.h" include\google\protobuf\stubs\hash.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\hash.h" include\google\protobuf\stubs\hash.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\io_win32.h" include\google\protobuf\stubs\io_win32.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\logging.h" include\google\protobuf\stubs\logging.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\logging.h" include\google\protobuf\stubs\logging.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\macros.h" include\google\protobuf\stubs\macros.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\macros.h" include\google\protobuf\stubs\macros.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\mutex.h" include\google\protobuf\stubs\mutex.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\mutex.h" include\google\protobuf\stubs\mutex.h

@ -17,7 +17,7 @@ AC_PREREQ(2.59)
# In the SVN trunk, the version should always be the next anticipated release # In the SVN trunk, the version should always be the next anticipated release
# version with the "-pre" suffix. (We used to use "-SNAPSHOT" but this pushed # version with the "-pre" suffix. (We used to use "-SNAPSHOT" but this pushed
# the size of one file name in the dist tarfile over the 99-char limit.) # the size of one file name in the dist tarfile over the 99-char limit.)
AC_INIT([Protocol Buffers],[3.7.0],[protobuf@googlegroups.com],[protobuf]) AC_INIT([Protocol Buffers],[3.7.1],[protobuf@googlegroups.com],[protobuf])
AM_MAINTAINER_MODE([enable]) AM_MAINTAINER_MODE([enable])
@ -165,6 +165,10 @@ AS_IF([test "$with_zlib" != no], [
]) ])
AM_CONDITIONAL([HAVE_ZLIB], [test $HAVE_ZLIB = 1]) AM_CONDITIONAL([HAVE_ZLIB], [test $HAVE_ZLIB = 1])
# Add -std=c++11 if necesssary. It is important for us to do this before the
# libatomic check below, since that also depends on C++11.
AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory])
dnl On some platforms, std::atomic needs a helper library dnl On some platforms, std::atomic needs a helper library
AC_MSG_CHECKING(whether -latomic is needed) AC_MSG_CHECKING(whether -latomic is needed)
AC_LINK_IFELSE([AC_LANG_SOURCE([[ AC_LINK_IFELSE([AC_LANG_SOURCE([[
@ -214,8 +218,6 @@ case "$target_os" in
esac esac
AM_CONDITIONAL([OBJC_CONFORMANCE_TEST], [test $OBJC_CONFORMANCE_TEST = 1]) AM_CONDITIONAL([OBJC_CONFORMANCE_TEST], [test $OBJC_CONFORMANCE_TEST = 1])
AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory])
# HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS, # HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS,
# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock # since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock
# too. # too.

@ -2139,6 +2139,24 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() {
} }
} }
)"); )");
RunValidJsonTest(
"StructWithEmptyListValue", REQUIRED,
R"({
"optionalStruct": {
"listValue": []
}
})",
R"(
optional_struct: {
fields: {
key: "listValue"
value: {
list_value: {
}
}
}
}
)");
// Value // Value
RunValidJsonTest( RunValidJsonTest(
"ValueAcceptInteger", REQUIRED, "ValueAcceptInteger", REQUIRED,
@ -2190,6 +2208,36 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() {
} }
} }
)"); )");
RunValidJsonTest(
"RepeatedValue", REQUIRED,
R"({
"repeatedValue": [["a"]]
})",
R"(
repeated_value: [
{
list_value: {
values: [
{ string_value: "a"}
]
}
}
]
)");
RunValidJsonTest(
"RepeatedListValue", REQUIRED,
R"({
"repeatedListValue": [["a"]]
})",
R"(
repeated_list_value: [
{
values: [
{ string_value: "a"}
]
}
]
)");
// Any // Any
RunValidJsonTest( RunValidJsonTest(

@ -14,6 +14,8 @@ Required.Proto3.JsonInput.DoubleFieldTooSmall
Required.Proto3.JsonInput.Int32FieldNotInteger Required.Proto3.JsonInput.Int32FieldNotInteger
Required.Proto3.JsonInput.Int64FieldNotInteger Required.Proto3.JsonInput.Int64FieldNotInteger
Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingStringsGotInt Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingStringsGotInt
Required.Proto3.JsonInput.RepeatedListValue.JsonOutput
Required.Proto3.JsonInput.RepeatedListValue.ProtobufOutput
Required.Proto3.JsonInput.StringFieldNotAString Required.Proto3.JsonInput.StringFieldNotAString
Required.Proto3.JsonInput.Uint32FieldNotInteger Required.Proto3.JsonInput.Uint32FieldNotInteger
Required.Proto3.JsonInput.Uint64FieldNotInteger Required.Proto3.JsonInput.Uint64FieldNotInteger

@ -5,7 +5,7 @@
<title>Google Protocol Buffers tools</title> <title>Google Protocol Buffers tools</title>
<summary>Tools for Protocol Buffers - Google's data interchange format.</summary> <summary>Tools for Protocol Buffers - Google's data interchange format.</summary>
<description>See project site for more info.</description> <description>See project site for more info.</description>
<version>3.7.0</version> <version>3.7.1</version>
<authors>Google Inc.</authors> <authors>Google Inc.</authors>
<owners>protobuf-packages</owners> <owners>protobuf-packages</owners>
<licenseUrl>https://github.com/protocolbuffers/protobuf/blob/master/LICENSE</licenseUrl> <licenseUrl>https://github.com/protocolbuffers/protobuf/blob/master/LICENSE</licenseUrl>

@ -29,7 +29,7 @@ namespace ProtobufTestMessages.Proto3 {
"dWYvYW55LnByb3RvGh5nb29nbGUvcHJvdG9idWYvZHVyYXRpb24ucHJvdG8a", "dWYvYW55LnByb3RvGh5nb29nbGUvcHJvdG9idWYvZHVyYXRpb24ucHJvdG8a",
"IGdvb2dsZS9wcm90b2J1Zi9maWVsZF9tYXNrLnByb3RvGhxnb29nbGUvcHJv", "IGdvb2dsZS9wcm90b2J1Zi9maWVsZF9tYXNrLnByb3RvGhxnb29nbGUvcHJv",
"dG9idWYvc3RydWN0LnByb3RvGh9nb29nbGUvcHJvdG9idWYvdGltZXN0YW1w", "dG9idWYvc3RydWN0LnByb3RvGh9nb29nbGUvcHJvdG9idWYvdGltZXN0YW1w",
"LnByb3RvGh5nb29nbGUvcHJvdG9idWYvd3JhcHBlcnMucHJvdG8i7TwKElRl", "LnByb3RvGh5nb29nbGUvcHJvdG9idWYvd3JhcHBlcnMucHJvdG8ipz0KElRl",
"c3RBbGxUeXBlc1Byb3RvMxIWCg5vcHRpb25hbF9pbnQzMhgBIAEoBRIWCg5v", "c3RBbGxUeXBlc1Byb3RvMxIWCg5vcHRpb25hbF9pbnQzMhgBIAEoBRIWCg5v",
"cHRpb25hbF9pbnQ2NBgCIAEoAxIXCg9vcHRpb25hbF91aW50MzIYAyABKA0S", "cHRpb25hbF9pbnQ2NBgCIAEoAxIXCg9vcHRpb25hbF91aW50MzIYAyABKA0S",
"FwoPb3B0aW9uYWxfdWludDY0GAQgASgEEhcKD29wdGlvbmFsX3NpbnQzMhgF", "FwoPb3B0aW9uYWxfdWludDY0GAQgASgEEhcKD29wdGlvbmFsX3NpbnQzMhgF",
@ -158,59 +158,60 @@ namespace ProtobufTestMessages.Proto3 {
"LnByb3RvYnVmLkZpZWxkTWFzaxIxCg9yZXBlYXRlZF9zdHJ1Y3QYxAIgAygL", "LnByb3RvYnVmLkZpZWxkTWFzaxIxCg9yZXBlYXRlZF9zdHJ1Y3QYxAIgAygL",
"MhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdBIrCgxyZXBlYXRlZF9hbnkYuwIg", "MhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdBIrCgxyZXBlYXRlZF9hbnkYuwIg",
"AygLMhQuZ29vZ2xlLnByb3RvYnVmLkFueRIvCg5yZXBlYXRlZF92YWx1ZRi8", "AygLMhQuZ29vZ2xlLnByb3RvYnVmLkFueRIvCg5yZXBlYXRlZF92YWx1ZRi8",
"AiADKAsyFi5nb29nbGUucHJvdG9idWYuVmFsdWUSEwoKZmllbGRuYW1lMRiR", "AiADKAsyFi5nb29nbGUucHJvdG9idWYuVmFsdWUSOAoTcmVwZWF0ZWRfbGlz",
"AyABKAUSFAoLZmllbGRfbmFtZTIYkgMgASgFEhUKDF9maWVsZF9uYW1lMxiT", "dF92YWx1ZRi9AiADKAsyGi5nb29nbGUucHJvdG9idWYuTGlzdFZhbHVlEhMK",
"AyABKAUSFgoNZmllbGRfX25hbWU0XxiUAyABKAUSFAoLZmllbGQwbmFtZTUY", "CmZpZWxkbmFtZTEYkQMgASgFEhQKC2ZpZWxkX25hbWUyGJIDIAEoBRIVCgxf",
"lQMgASgFEhYKDWZpZWxkXzBfbmFtZTYYlgMgASgFEhMKCmZpZWxkTmFtZTcY", "ZmllbGRfbmFtZTMYkwMgASgFEhYKDWZpZWxkX19uYW1lNF8YlAMgASgFEhQK",
"lwMgASgFEhMKCkZpZWxkTmFtZTgYmAMgASgFEhQKC2ZpZWxkX05hbWU5GJkD", "C2ZpZWxkMG5hbWU1GJUDIAEoBRIWCg1maWVsZF8wX25hbWU2GJYDIAEoBRIT",
"IAEoBRIVCgxGaWVsZF9OYW1lMTAYmgMgASgFEhUKDEZJRUxEX05BTUUxMRib", "CgpmaWVsZE5hbWU3GJcDIAEoBRITCgpGaWVsZE5hbWU4GJgDIAEoBRIUCgtm",
"AyABKAUSFQoMRklFTERfbmFtZTEyGJwDIAEoBRIXCg5fX2ZpZWxkX25hbWUx", "aWVsZF9OYW1lORiZAyABKAUSFQoMRmllbGRfTmFtZTEwGJoDIAEoBRIVCgxG",
"MxidAyABKAUSFwoOX19GaWVsZF9uYW1lMTQYngMgASgFEhYKDWZpZWxkX19u", "SUVMRF9OQU1FMTEYmwMgASgFEhUKDEZJRUxEX25hbWUxMhicAyABKAUSFwoO",
"YW1lMTUYnwMgASgFEhYKDWZpZWxkX19OYW1lMTYYoAMgASgFEhcKDmZpZWxk", "X19maWVsZF9uYW1lMTMYnQMgASgFEhcKDl9fRmllbGRfbmFtZTE0GJ4DIAEo",
"X25hbWUxN19fGKEDIAEoBRIXCg5GaWVsZF9uYW1lMThfXxiiAyABKAUaYgoN", "BRIWCg1maWVsZF9fbmFtZTE1GJ8DIAEoBRIWCg1maWVsZF9fTmFtZTE2GKAD",
"TmVzdGVkTWVzc2FnZRIJCgFhGAEgASgFEkYKC2NvcmVjdXJzaXZlGAIgASgL", "IAEoBRIXCg5maWVsZF9uYW1lMTdfXxihAyABKAUSFwoORmllbGRfbmFtZTE4",
"MjEucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5wcm90bzMuVGVzdEFsbFR5cGVz", "X18YogMgASgFGmIKDU5lc3RlZE1lc3NhZ2USCQoBYRgBIAEoBRJGCgtjb3Jl",
"UHJvdG8zGjQKEk1hcEludDMySW50MzJFbnRyeRILCgNrZXkYASABKAUSDQoF", "Y3Vyc2l2ZRgCIAEoCzIxLnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8z",
"dmFsdWUYAiABKAU6AjgBGjQKEk1hcEludDY0SW50NjRFbnRyeRILCgNrZXkY", "LlRlc3RBbGxUeXBlc1Byb3RvMxo0ChJNYXBJbnQzMkludDMyRW50cnkSCwoD",
"ASABKAMSDQoFdmFsdWUYAiABKAM6AjgBGjYKFE1hcFVpbnQzMlVpbnQzMkVu", "a2V5GAEgASgFEg0KBXZhbHVlGAIgASgFOgI4ARo0ChJNYXBJbnQ2NEludDY0",
"dHJ5EgsKA2tleRgBIAEoDRINCgV2YWx1ZRgCIAEoDToCOAEaNgoUTWFwVWlu", "RW50cnkSCwoDa2V5GAEgASgDEg0KBXZhbHVlGAIgASgDOgI4ARo2ChRNYXBV",
"dDY0VWludDY0RW50cnkSCwoDa2V5GAEgASgEEg0KBXZhbHVlGAIgASgEOgI4", "aW50MzJVaW50MzJFbnRyeRILCgNrZXkYASABKA0SDQoFdmFsdWUYAiABKA06",
"ARo2ChRNYXBTaW50MzJTaW50MzJFbnRyeRILCgNrZXkYASABKBESDQoFdmFs", "AjgBGjYKFE1hcFVpbnQ2NFVpbnQ2NEVudHJ5EgsKA2tleRgBIAEoBBINCgV2",
"dWUYAiABKBE6AjgBGjYKFE1hcFNpbnQ2NFNpbnQ2NEVudHJ5EgsKA2tleRgB", "YWx1ZRgCIAEoBDoCOAEaNgoUTWFwU2ludDMyU2ludDMyRW50cnkSCwoDa2V5",
"IAEoEhINCgV2YWx1ZRgCIAEoEjoCOAEaOAoWTWFwRml4ZWQzMkZpeGVkMzJF", "GAEgASgREg0KBXZhbHVlGAIgASgROgI4ARo2ChRNYXBTaW50NjRTaW50NjRF",
"bnRyeRILCgNrZXkYASABKAcSDQoFdmFsdWUYAiABKAc6AjgBGjgKFk1hcEZp", "bnRyeRILCgNrZXkYASABKBISDQoFdmFsdWUYAiABKBI6AjgBGjgKFk1hcEZp",
"eGVkNjRGaXhlZDY0RW50cnkSCwoDa2V5GAEgASgGEg0KBXZhbHVlGAIgASgG", "eGVkMzJGaXhlZDMyRW50cnkSCwoDa2V5GAEgASgHEg0KBXZhbHVlGAIgASgH",
"OgI4ARo6ChhNYXBTZml4ZWQzMlNmaXhlZDMyRW50cnkSCwoDa2V5GAEgASgP", "OgI4ARo4ChZNYXBGaXhlZDY0Rml4ZWQ2NEVudHJ5EgsKA2tleRgBIAEoBhIN",
"Eg0KBXZhbHVlGAIgASgPOgI4ARo6ChhNYXBTZml4ZWQ2NFNmaXhlZDY0RW50", "CgV2YWx1ZRgCIAEoBjoCOAEaOgoYTWFwU2ZpeGVkMzJTZml4ZWQzMkVudHJ5",
"cnkSCwoDa2V5GAEgASgQEg0KBXZhbHVlGAIgASgQOgI4ARo0ChJNYXBJbnQz", "EgsKA2tleRgBIAEoDxINCgV2YWx1ZRgCIAEoDzoCOAEaOgoYTWFwU2ZpeGVk",
"MkZsb2F0RW50cnkSCwoDa2V5GAEgASgFEg0KBXZhbHVlGAIgASgCOgI4ARo1", "NjRTZml4ZWQ2NEVudHJ5EgsKA2tleRgBIAEoEBINCgV2YWx1ZRgCIAEoEDoC",
"ChNNYXBJbnQzMkRvdWJsZUVudHJ5EgsKA2tleRgBIAEoBRINCgV2YWx1ZRgC", "OAEaNAoSTWFwSW50MzJGbG9hdEVudHJ5EgsKA2tleRgBIAEoBRINCgV2YWx1",
"IAEoAToCOAEaMgoQTWFwQm9vbEJvb2xFbnRyeRILCgNrZXkYASABKAgSDQoF", "ZRgCIAEoAjoCOAEaNQoTTWFwSW50MzJEb3VibGVFbnRyeRILCgNrZXkYASAB",
"dmFsdWUYAiABKAg6AjgBGjYKFE1hcFN0cmluZ1N0cmluZ0VudHJ5EgsKA2tl", "KAUSDQoFdmFsdWUYAiABKAE6AjgBGjIKEE1hcEJvb2xCb29sRW50cnkSCwoD",
"eRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAEaNQoTTWFwU3RyaW5nQnl0ZXNF", "a2V5GAEgASgIEg0KBXZhbHVlGAIgASgIOgI4ARo2ChRNYXBTdHJpbmdTdHJp",
"bnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAw6AjgBGn4KG01hcFN0", "bmdFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBGjUKE01h",
"cmluZ05lc3RlZE1lc3NhZ2VFbnRyeRILCgNrZXkYASABKAkSTgoFdmFsdWUY", "cFN0cmluZ0J5dGVzRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgM",
"AiABKAsyPy5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxs", "OgI4ARp+ChtNYXBTdHJpbmdOZXN0ZWRNZXNzYWdlRW50cnkSCwoDa2V5GAEg",
"VHlwZXNQcm90bzMuTmVzdGVkTWVzc2FnZToCOAEabQocTWFwU3RyaW5nRm9y", "ASgJEk4KBXZhbHVlGAIgASgLMj8ucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5w",
"ZWlnbk1lc3NhZ2VFbnRyeRILCgNrZXkYASABKAkSPAoFdmFsdWUYAiABKAsy", "cm90bzMuVGVzdEFsbFR5cGVzUHJvdG8zLk5lc3RlZE1lc3NhZ2U6AjgBGm0K",
"LS5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3RvMy5Gb3JlaWduTWVzc2Fn", "HE1hcFN0cmluZ0ZvcmVpZ25NZXNzYWdlRW50cnkSCwoDa2V5GAEgASgJEjwK",
"ZToCOAEaeAoYTWFwU3RyaW5nTmVzdGVkRW51bUVudHJ5EgsKA2tleRgBIAEo", "BXZhbHVlGAIgASgLMi0ucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5wcm90bzMu",
"CRJLCgV2YWx1ZRgCIAEoDjI8LnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJv", "Rm9yZWlnbk1lc3NhZ2U6AjgBGngKGE1hcFN0cmluZ05lc3RlZEVudW1FbnRy",
"dG8zLlRlc3RBbGxUeXBlc1Byb3RvMy5OZXN0ZWRFbnVtOgI4ARpnChlNYXBT", "eRILCgNrZXkYASABKAkSSwoFdmFsdWUYAiABKA4yPC5wcm90b2J1Zl90ZXN0",
"dHJpbmdGb3JlaWduRW51bUVudHJ5EgsKA2tleRgBIAEoCRI5CgV2YWx1ZRgC", "X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlwZXNQcm90bzMuTmVzdGVkRW51",
"IAEoDjIqLnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8zLkZvcmVpZ25F", "bToCOAEaZwoZTWFwU3RyaW5nRm9yZWlnbkVudW1FbnRyeRILCgNrZXkYASAB",
"bnVtOgI4ASI5CgpOZXN0ZWRFbnVtEgcKA0ZPTxAAEgcKA0JBUhABEgcKA0JB", "KAkSOQoFdmFsdWUYAiABKA4yKi5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLnBy",
"WhACEhAKA05FRxD///////////8BIlkKC0FsaWFzZWRFbnVtEg0KCUFMSUFT", "b3RvMy5Gb3JlaWduRW51bToCOAEiOQoKTmVzdGVkRW51bRIHCgNGT08QABIH",
"X0ZPTxAAEg0KCUFMSUFTX0JBUhABEg0KCUFMSUFTX0JBWhACEgcKA1FVWBAC", "CgNCQVIQARIHCgNCQVoQAhIQCgNORUcQ////////////ASJZCgtBbGlhc2Vk",
"EgcKA3F1eBACEgcKA2JBehACGgIQAUINCgtvbmVvZl9maWVsZEoGCPUDEP8D", "RW51bRINCglBTElBU19GT08QABINCglBTElBU19CQVIQARINCglBTElBU19C",
"IhsKDkZvcmVpZ25NZXNzYWdlEgkKAWMYASABKAUqQAoLRm9yZWlnbkVudW0S", "QVoQAhIHCgNRVVgQAhIHCgNxdXgQAhIHCgNiQXoQAhoCEAFCDQoLb25lb2Zf",
"DwoLRk9SRUlHTl9GT08QABIPCgtGT1JFSUdOX0JBUhABEg8KC0ZPUkVJR05f", "ZmllbGRKBgj1AxD/AyIbCg5Gb3JlaWduTWVzc2FnZRIJCgFjGAEgASgFKkAK",
"QkFaEAJCOAooY29tLmdvb2dsZS5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLnBy", "C0ZvcmVpZ25FbnVtEg8KC0ZPUkVJR05fRk9PEAASDwoLRk9SRUlHTl9CQVIQ",
"b3RvM0gB+AEBogIGUHJvdG8zYgZwcm90bzM=")); "ARIPCgtGT1JFSUdOX0JBWhACQjgKKGNvbS5nb29nbGUucHJvdG9idWZfdGVz",
"dF9tZXNzYWdlcy5wcm90bzNIAfgBAaICBlByb3RvM2IGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.AnyReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.DurationReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.FieldMaskReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.WrappersReflection.Descriptor, }, new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.AnyReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.DurationReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.FieldMaskReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.WrappersReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::ProtobufTestMessages.Proto3.ForeignEnum), }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(new[] {typeof(global::ProtobufTestMessages.Proto3.ForeignEnum), }, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto3.TestAllTypesProto3), global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Parser, new[]{ "OptionalInt32", "OptionalInt64", "OptionalUint32", "OptionalUint64", "OptionalSint32", "OptionalSint64", "OptionalFixed32", "OptionalFixed64", "OptionalSfixed32", "OptionalSfixed64", "OptionalFloat", "OptionalDouble", "OptionalBool", "OptionalString", "OptionalBytes", "OptionalNestedMessage", "OptionalForeignMessage", "OptionalNestedEnum", "OptionalForeignEnum", "OptionalAliasedEnum", "OptionalStringPiece", "OptionalCord", "RecursiveMessage", "RepeatedInt32", "RepeatedInt64", "RepeatedUint32", "RepeatedUint64", "RepeatedSint32", "RepeatedSint64", "RepeatedFixed32", "RepeatedFixed64", "RepeatedSfixed32", "RepeatedSfixed64", "RepeatedFloat", "RepeatedDouble", "RepeatedBool", "RepeatedString", "RepeatedBytes", "RepeatedNestedMessage", "RepeatedForeignMessage", "RepeatedNestedEnum", "RepeatedForeignEnum", "RepeatedStringPiece", "RepeatedCord", "MapInt32Int32", "MapInt64Int64", "MapUint32Uint32", "MapUint64Uint64", "MapSint32Sint32", "MapSint64Sint64", "MapFixed32Fixed32", "MapFixed64Fixed64", "MapSfixed32Sfixed32", "MapSfixed64Sfixed64", "MapInt32Float", "MapInt32Double", "MapBoolBool", "MapStringString", "MapStringBytes", "MapStringNestedMessage", "MapStringForeignMessage", "MapStringNestedEnum", "MapStringForeignEnum", "OneofUint32", "OneofNestedMessage", "OneofString", "OneofBytes", "OneofBool", "OneofUint64", "OneofFloat", "OneofDouble", "OneofEnum", "OptionalBoolWrapper", "OptionalInt32Wrapper", "OptionalInt64Wrapper", "OptionalUint32Wrapper", "OptionalUint64Wrapper", "OptionalFloatWrapper", "OptionalDoubleWrapper", "OptionalStringWrapper", "OptionalBytesWrapper", "RepeatedBoolWrapper", "RepeatedInt32Wrapper", "RepeatedInt64Wrapper", "RepeatedUint32Wrapper", "RepeatedUint64Wrapper", "RepeatedFloatWrapper", "RepeatedDoubleWrapper", "RepeatedStringWrapper", "RepeatedBytesWrapper", "OptionalDuration", "OptionalTimestamp", "OptionalFieldMask", "OptionalStruct", "OptionalAny", "OptionalValue", "RepeatedDuration", "RepeatedTimestamp", "RepeatedFieldmask", "RepeatedStruct", "RepeatedAny", "RepeatedValue", "Fieldname1", "FieldName2", "FieldName3", "FieldName4", "Field0Name5", "Field0Name6", "FieldName7", "FieldName8", "FieldName9", "FieldName10", "FIELDNAME11", "FIELDName12", "FieldName13", "FieldName14", "FieldName15", "FieldName16", "FieldName17", "FieldName18" }, new[]{ "OneofField" }, new[]{ typeof(global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedEnum), typeof(global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.AliasedEnum) }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedMessage), global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedMessage.Parser, new[]{ "A", "Corecursive" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto3.TestAllTypesProto3), global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Parser, new[]{ "OptionalInt32", "OptionalInt64", "OptionalUint32", "OptionalUint64", "OptionalSint32", "OptionalSint64", "OptionalFixed32", "OptionalFixed64", "OptionalSfixed32", "OptionalSfixed64", "OptionalFloat", "OptionalDouble", "OptionalBool", "OptionalString", "OptionalBytes", "OptionalNestedMessage", "OptionalForeignMessage", "OptionalNestedEnum", "OptionalForeignEnum", "OptionalAliasedEnum", "OptionalStringPiece", "OptionalCord", "RecursiveMessage", "RepeatedInt32", "RepeatedInt64", "RepeatedUint32", "RepeatedUint64", "RepeatedSint32", "RepeatedSint64", "RepeatedFixed32", "RepeatedFixed64", "RepeatedSfixed32", "RepeatedSfixed64", "RepeatedFloat", "RepeatedDouble", "RepeatedBool", "RepeatedString", "RepeatedBytes", "RepeatedNestedMessage", "RepeatedForeignMessage", "RepeatedNestedEnum", "RepeatedForeignEnum", "RepeatedStringPiece", "RepeatedCord", "MapInt32Int32", "MapInt64Int64", "MapUint32Uint32", "MapUint64Uint64", "MapSint32Sint32", "MapSint64Sint64", "MapFixed32Fixed32", "MapFixed64Fixed64", "MapSfixed32Sfixed32", "MapSfixed64Sfixed64", "MapInt32Float", "MapInt32Double", "MapBoolBool", "MapStringString", "MapStringBytes", "MapStringNestedMessage", "MapStringForeignMessage", "MapStringNestedEnum", "MapStringForeignEnum", "OneofUint32", "OneofNestedMessage", "OneofString", "OneofBytes", "OneofBool", "OneofUint64", "OneofFloat", "OneofDouble", "OneofEnum", "OptionalBoolWrapper", "OptionalInt32Wrapper", "OptionalInt64Wrapper", "OptionalUint32Wrapper", "OptionalUint64Wrapper", "OptionalFloatWrapper", "OptionalDoubleWrapper", "OptionalStringWrapper", "OptionalBytesWrapper", "RepeatedBoolWrapper", "RepeatedInt32Wrapper", "RepeatedInt64Wrapper", "RepeatedUint32Wrapper", "RepeatedUint64Wrapper", "RepeatedFloatWrapper", "RepeatedDoubleWrapper", "RepeatedStringWrapper", "RepeatedBytesWrapper", "OptionalDuration", "OptionalTimestamp", "OptionalFieldMask", "OptionalStruct", "OptionalAny", "OptionalValue", "RepeatedDuration", "RepeatedTimestamp", "RepeatedFieldmask", "RepeatedStruct", "RepeatedAny", "RepeatedValue", "RepeatedListValue", "Fieldname1", "FieldName2", "FieldName3", "FieldName4", "Field0Name5", "Field0Name6", "FieldName7", "FieldName8", "FieldName9", "FieldName10", "FIELDNAME11", "FIELDName12", "FieldName13", "FieldName14", "FieldName15", "FieldName16", "FieldName17", "FieldName18" }, new[]{ "OneofField" }, new[]{ typeof(global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedEnum), typeof(global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.AliasedEnum) }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedMessage), global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedMessage.Parser, new[]{ "A", "Corecursive" }, null, null, null),
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, }), null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, }),
new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto3.ForeignMessage), global::ProtobufTestMessages.Proto3.ForeignMessage.Parser, new[]{ "C" }, null, null, null) new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto3.ForeignMessage), global::ProtobufTestMessages.Proto3.ForeignMessage.Parser, new[]{ "C" }, null, null, null)
})); }));
@ -355,6 +356,7 @@ namespace ProtobufTestMessages.Proto3 {
repeatedStruct_ = other.repeatedStruct_.Clone(); repeatedStruct_ = other.repeatedStruct_.Clone();
repeatedAny_ = other.repeatedAny_.Clone(); repeatedAny_ = other.repeatedAny_.Clone();
repeatedValue_ = other.repeatedValue_.Clone(); repeatedValue_ = other.repeatedValue_.Clone();
repeatedListValue_ = other.repeatedListValue_.Clone();
fieldname1_ = other.fieldname1_; fieldname1_ = other.fieldname1_;
fieldName2_ = other.fieldName2_; fieldName2_ = other.fieldName2_;
FieldName3_ = other.FieldName3_; FieldName3_ = other.FieldName3_;
@ -1508,6 +1510,16 @@ namespace ProtobufTestMessages.Proto3 {
get { return repeatedValue_; } get { return repeatedValue_; }
} }
/// <summary>Field number for the "repeated_list_value" field.</summary>
public const int RepeatedListValueFieldNumber = 317;
private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.ListValue> _repeated_repeatedListValue_codec
= pb::FieldCodec.ForMessage(2538, global::Google.Protobuf.WellKnownTypes.ListValue.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.ListValue> repeatedListValue_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.ListValue>();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.ListValue> RepeatedListValue {
get { return repeatedListValue_; }
}
/// <summary>Field number for the "fieldname1" field.</summary> /// <summary>Field number for the "fieldname1" field.</summary>
public const int Fieldname1FieldNumber = 401; public const int Fieldname1FieldNumber = 401;
private int fieldname1_; private int fieldname1_;
@ -1851,6 +1863,7 @@ namespace ProtobufTestMessages.Proto3 {
if(!repeatedStruct_.Equals(other.repeatedStruct_)) return false; if(!repeatedStruct_.Equals(other.repeatedStruct_)) return false;
if(!repeatedAny_.Equals(other.repeatedAny_)) return false; if(!repeatedAny_.Equals(other.repeatedAny_)) return false;
if(!repeatedValue_.Equals(other.repeatedValue_)) return false; if(!repeatedValue_.Equals(other.repeatedValue_)) return false;
if(!repeatedListValue_.Equals(other.repeatedListValue_)) return false;
if (Fieldname1 != other.Fieldname1) return false; if (Fieldname1 != other.Fieldname1) return false;
if (FieldName2 != other.FieldName2) return false; if (FieldName2 != other.FieldName2) return false;
if (FieldName3 != other.FieldName3) return false; if (FieldName3 != other.FieldName3) return false;
@ -1978,6 +1991,7 @@ namespace ProtobufTestMessages.Proto3 {
hash ^= repeatedStruct_.GetHashCode(); hash ^= repeatedStruct_.GetHashCode();
hash ^= repeatedAny_.GetHashCode(); hash ^= repeatedAny_.GetHashCode();
hash ^= repeatedValue_.GetHashCode(); hash ^= repeatedValue_.GetHashCode();
hash ^= repeatedListValue_.GetHashCode();
if (Fieldname1 != 0) hash ^= Fieldname1.GetHashCode(); if (Fieldname1 != 0) hash ^= Fieldname1.GetHashCode();
if (FieldName2 != 0) hash ^= FieldName2.GetHashCode(); if (FieldName2 != 0) hash ^= FieldName2.GetHashCode();
if (FieldName3 != 0) hash ^= FieldName3.GetHashCode(); if (FieldName3 != 0) hash ^= FieldName3.GetHashCode();
@ -2243,6 +2257,7 @@ namespace ProtobufTestMessages.Proto3 {
repeatedFieldmask_.WriteTo(output, _repeated_repeatedFieldmask_codec); repeatedFieldmask_.WriteTo(output, _repeated_repeatedFieldmask_codec);
repeatedAny_.WriteTo(output, _repeated_repeatedAny_codec); repeatedAny_.WriteTo(output, _repeated_repeatedAny_codec);
repeatedValue_.WriteTo(output, _repeated_repeatedValue_codec); repeatedValue_.WriteTo(output, _repeated_repeatedValue_codec);
repeatedListValue_.WriteTo(output, _repeated_repeatedListValue_codec);
repeatedStruct_.WriteTo(output, _repeated_repeatedStruct_codec); repeatedStruct_.WriteTo(output, _repeated_repeatedStruct_codec);
if (Fieldname1 != 0) { if (Fieldname1 != 0) {
output.WriteRawTag(136, 25); output.WriteRawTag(136, 25);
@ -2520,6 +2535,7 @@ namespace ProtobufTestMessages.Proto3 {
size += repeatedStruct_.CalculateSize(_repeated_repeatedStruct_codec); size += repeatedStruct_.CalculateSize(_repeated_repeatedStruct_codec);
size += repeatedAny_.CalculateSize(_repeated_repeatedAny_codec); size += repeatedAny_.CalculateSize(_repeated_repeatedAny_codec);
size += repeatedValue_.CalculateSize(_repeated_repeatedValue_codec); size += repeatedValue_.CalculateSize(_repeated_repeatedValue_codec);
size += repeatedListValue_.CalculateSize(_repeated_repeatedListValue_codec);
if (Fieldname1 != 0) { if (Fieldname1 != 0) {
size += 2 + pb::CodedOutputStream.ComputeInt32Size(Fieldname1); size += 2 + pb::CodedOutputStream.ComputeInt32Size(Fieldname1);
} }
@ -2799,6 +2815,7 @@ namespace ProtobufTestMessages.Proto3 {
repeatedStruct_.Add(other.repeatedStruct_); repeatedStruct_.Add(other.repeatedStruct_);
repeatedAny_.Add(other.repeatedAny_); repeatedAny_.Add(other.repeatedAny_);
repeatedValue_.Add(other.repeatedValue_); repeatedValue_.Add(other.repeatedValue_);
repeatedListValue_.Add(other.repeatedListValue_);
if (other.Fieldname1 != 0) { if (other.Fieldname1 != 0) {
Fieldname1 = other.Fieldname1; Fieldname1 = other.Fieldname1;
} }
@ -3376,6 +3393,10 @@ namespace ProtobufTestMessages.Proto3 {
repeatedValue_.AddEntriesFrom(input, _repeated_repeatedValue_codec); repeatedValue_.AddEntriesFrom(input, _repeated_repeatedValue_codec);
break; break;
} }
case 2538: {
repeatedListValue_.AddEntriesFrom(input, _repeated_repeatedListValue_codec);
break;
}
case 2594: { case 2594: {
repeatedStruct_.AddEntriesFrom(input, _repeated_repeatedStruct_codec); repeatedStruct_.AddEntriesFrom(input, _repeated_repeatedStruct_codec);
break; break;

@ -4,7 +4,7 @@
<Description>C# runtime library for Protocol Buffers - Google's data interchange format.</Description> <Description>C# runtime library for Protocol Buffers - Google's data interchange format.</Description>
<Copyright>Copyright 2015, Google Inc.</Copyright> <Copyright>Copyright 2015, Google Inc.</Copyright>
<AssemblyTitle>Google Protocol Buffers</AssemblyTitle> <AssemblyTitle>Google Protocol Buffers</AssemblyTitle>
<VersionPrefix>3.7.0</VersionPrefix> <VersionPrefix>3.7.1</VersionPrefix>
<LangVersion>6</LangVersion> <LangVersion>6</LangVersion>
<Authors>Google Inc.</Authors> <Authors>Google Inc.</Authors>
<TargetFrameworks>netstandard1.0;netstandard2.0;net45</TargetFrameworks> <TargetFrameworks>netstandard1.0;netstandard2.0;net45</TargetFrameworks>

@ -4,7 +4,7 @@
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protobuf-bom</artifactId> <artifactId>protobuf-bom</artifactId>
<version>3.7.0</version> <version>3.7.1</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Protocol Buffers [BOM]</name> <name>Protocol Buffers [BOM]</name>

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId> <artifactId>protobuf-parent</artifactId>
<version>3.7.0</version> <version>3.7.1</version>
</parent> </parent>
<artifactId>protobuf-java</artifactId> <artifactId>protobuf-java</artifactId>

@ -4,7 +4,7 @@
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId> <artifactId>protobuf-parent</artifactId>
<version>3.7.0</version> <version>3.7.1</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Protocol Buffers [Parent]</name> <name>Protocol Buffers [Parent]</name>

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId> <artifactId>protobuf-parent</artifactId>
<version>3.7.0</version> <version>3.7.1</version>
</parent> </parent>
<artifactId>protobuf-java-util</artifactId> <artifactId>protobuf-java-util</artifactId>

@ -1,6 +1,6 @@
{ {
"name": "google-protobuf", "name": "google-protobuf",
"version": "3.7.0", "version": "3.7.1",
"description": "Protocol Buffers for JavaScript", "description": "Protocol Buffers for JavaScript",
"main": "google-protobuf.js", "main": "google-protobuf.js",
"files": [ "files": [

@ -23,7 +23,7 @@ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/
source $HOME/.rvm/scripts/rvm source $HOME/.rvm/scripts/rvm
brew uninstall node icu4c cmake brew uninstall node icu4c cmake
brew prune brew prune
brew install gflags gpg gpg2 node pcre ruby cmake brew install gflags gpg gpg2 node openssl pcre ruby cmake
sudo chown -R $(whoami) /usr/local sudo chown -R $(whoami) /usr/local
brew postinstall node brew postinstall node

@ -10,11 +10,11 @@
<email>protobuf-opensource@google.com</email> <email>protobuf-opensource@google.com</email>
<active>yes</active> <active>yes</active>
</lead> </lead>
<date>2019-02-28</date> <date>2019-03-25</date>
<time>10:19:15</time> <time>13:23:39</time>
<version> <version>
<release>3.7.0</release> <release>3.7.1</release>
<api>3.7.0</api> <api>3.7.1</api>
</version> </version>
<stability> <stability>
<release>stable</release> <release>stable</release>
@ -304,5 +304,19 @@ G A release.
<license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license> <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license>
<notes>GA release.</notes> <notes>GA release.</notes>
</release> </release>
<release>
<version>
<release>3.7.1</release>
<api>3.7.1</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2019-03-25</date>
<time>13:23:39</time>
<license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license>
<notes>GA release.</notes>
</release>
</changelog> </changelog>
</package> </package>

@ -37,7 +37,7 @@
#include "upb.h" #include "upb.h"
#define PHP_PROTOBUF_EXTNAME "protobuf" #define PHP_PROTOBUF_EXTNAME "protobuf"
#define PHP_PROTOBUF_VERSION "3.7.0" #define PHP_PROTOBUF_VERSION "3.7.1"
#define MAX_LENGTH_OF_INT64 20 #define MAX_LENGTH_OF_INT64 20
#define SIZEOF_INT64 8 #define SIZEOF_INT64 8

@ -1,5 +1,4 @@
/* Amalgamated source file */ /* Amalgamated source file */
#define _XOPEN_SOURCE 700
#include "upb.h" #include "upb.h"
#ifndef UINTPTR_MAX #ifndef UINTPTR_MAX
@ -1086,11 +1085,12 @@ static bool upb_decode_message(upb_decstate *d, const char *limit,
return true; return true;
} }
bool upb_decode(upb_strview buf, void *msg, const upb_msglayout *l) { bool upb_decode(const char *buf, size_t size, void *msg,
const upb_msglayout *l) {
upb_decstate state; upb_decstate state;
state.ptr = buf.data; state.ptr = buf;
return upb_decode_message(&state, buf.data + buf.size, 0, msg, l); return upb_decode_message(&state, buf + size, 0, msg, l);
} }
#undef CHK #undef CHK
@ -2836,7 +2836,8 @@ bool _upb_symtab_loaddefinit(upb_symtab *s, const upb_def_init *init) {
if (!_upb_symtab_loaddefinit(s, *deps)) goto err; if (!_upb_symtab_loaddefinit(s, *deps)) goto err;
} }
file = google_protobuf_FileDescriptorProto_parsenew(init->descriptor, arena); file = google_protobuf_FileDescriptorProto_parse(
init->descriptor.data, init->descriptor.size, arena);
if (!file) { if (!file) {
upb_status_seterrf( upb_status_seterrf(
@ -5364,7 +5365,7 @@ bool upb_inttable_iter_isequal(const upb_inttable_iter *i1,
i1->array_part == i2->array_part; i1->array_part == i2->array_part;
} }
#ifdef UPB_UNALIGNED_READS_OK #if defined(UPB_UNALIGNED_READS_OK) || defined(__s390x__)
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* MurmurHash2, by Austin Appleby (released as public domain). * MurmurHash2, by Austin Appleby (released as public domain).
* Reformatted and C99-ified by Joshua Haberman. * Reformatted and C99-ified by Joshua Haberman.
@ -7835,7 +7836,7 @@ bool upb_pbdecoder_setmaxnesting(upb_pbdecoder *d, size_t max) {
** to perfectly match the output of reference encoders that always use the ** to perfectly match the output of reference encoders that always use the
** optimal amount of space for each length. ** optimal amount of space for each length.
** **
** (2) requires guessing the size upfront, and if multiple lengths are ** (2) requires guessing the the size upfront, and if multiple lengths are
** guessed wrong the minimum required number of memmove() operations may ** guessed wrong the minimum required number of memmove() operations may
** be complicated to compute correctly. Implemented properly, it may have ** be complicated to compute correctly. Implemented properly, it may have
** a useful amortized or average cost, but more investigation is required ** a useful amortized or average cost, but more investigation is required
@ -8797,9 +8798,6 @@ done:
** - handling of keys/escape-sequences/etc that span input buffers. ** - handling of keys/escape-sequences/etc that span input buffers.
*/ */
/* Need to define _XOPEN_SOURCE before any include to make strptime work. */
#define _XOPEN_SOURCE 700
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
#include <float.h> #include <float.h>
@ -8960,6 +8958,11 @@ typedef struct {
/* The table mapping json name to fielddef for this message. */ /* The table mapping json name to fielddef for this message. */
const upb_strtable *name_table; const upb_strtable *name_table;
/* We are in a repeated-field context. We need this flag to decide whether to
* handle the array as a normal repeated field or a
* google.protobuf.ListValue/google.protobuf.Value. */
bool is_repeated;
/* We are in a repeated-field context, ready to emit mapentries as /* We are in a repeated-field context, ready to emit mapentries as
* submessages. This flag alters the start-of-object (open-brace) behavior to * submessages. This flag alters the start-of-object (open-brace) behavior to
* begin a sequence of mapentry messages rather than a single submessage. */ * begin a sequence of mapentry messages rather than a single submessage. */
@ -8990,6 +8993,19 @@ typedef struct {
bool is_unknown_field; bool is_unknown_field;
} upb_jsonparser_frame; } upb_jsonparser_frame;
static void init_frame(upb_jsonparser_frame* frame) {
frame->m = NULL;
frame->f = NULL;
frame->name_table = NULL;
frame->is_repeated = false;
frame->is_map = false;
frame->is_mapentry = false;
frame->mapfield = NULL;
frame->is_any = false;
frame->any_frame = NULL;
frame->is_unknown_field = false;
}
struct upb_json_parser { struct upb_json_parser {
upb_arena *arena; upb_arena *arena;
const upb_json_parsermethod *method; const upb_json_parsermethod *method;
@ -9037,6 +9053,13 @@ struct upb_json_parser {
struct tm tm; struct tm tm;
}; };
static upb_jsonparser_frame* start_jsonparser_frame(upb_json_parser *p) {
upb_jsonparser_frame *inner;
inner = p->top + 1;
init_frame(inner);
return inner;
}
struct upb_json_codecache { struct upb_json_codecache {
upb_arena *arena; upb_arena *arena;
upb_inttable methods; /* upb_msgdef* -> upb_json_parsermethod* */ upb_inttable methods; /* upb_msgdef* -> upb_json_parsermethod* */
@ -9995,17 +10018,11 @@ static bool start_stringval(upb_json_parser *p) {
/* Start a new parser frame: parser frames correspond one-to-one with /* Start a new parser frame: parser frames correspond one-to-one with
* handler frames, and string events occur in a sub-frame. */ * handler frames, and string events occur in a sub-frame. */
inner = p->top + 1; inner = start_jsonparser_frame(p);
sel = getsel_for_handlertype(p, UPB_HANDLER_STARTSTR); sel = getsel_for_handlertype(p, UPB_HANDLER_STARTSTR);
upb_sink_startstr(p->top->sink, sel, 0, &inner->sink); upb_sink_startstr(p->top->sink, sel, 0, &inner->sink);
inner->m = p->top->m; inner->m = p->top->m;
inner->f = p->top->f; inner->f = p->top->f;
inner->name_table = NULL;
inner->is_map = false;
inner->is_mapentry = false;
inner->is_any = false;
inner->any_frame = NULL;
inner->is_unknown_field = false;
p->top = inner; p->top = inner;
if (upb_fielddef_type(p->top->f) == UPB_TYPE_STRING) { if (upb_fielddef_type(p->top->f) == UPB_TYPE_STRING) {
@ -10288,47 +10305,100 @@ static bool end_duration_base(upb_json_parser *p, const char *ptr) {
return true; return true;
} }
static void start_timestamp_base(upb_json_parser *p, const char *ptr) { static int parse_timestamp_number(upb_json_parser *p) {
size_t len;
const char *buf;
char *end;
int val;
/* atoi() and friends unfortunately do not support specifying the length of
* the input string, so we need to force a copy into a NULL-terminated buffer. */
multipart_text(p, "\0", 1, false);
buf = accumulate_getptr(p, &len);
val = atoi(buf);
multipart_end(p);
multipart_startaccum(p);
return val;
}
static void start_year(upb_json_parser *p, const char *ptr) {
capture_begin(p, ptr); capture_begin(p, ptr);
} }
#define UPB_TIMESTAMP_BASE_SIZE 19 static bool end_year(upb_json_parser *p, const char *ptr) {
if (!capture_end(p, ptr)) {
return false;
}
p->tm.tm_year = parse_timestamp_number(p) - 1900;
return true;
}
static bool end_timestamp_base(upb_json_parser *p, const char *ptr) { static void start_month(upb_json_parser *p, const char *ptr) {
size_t len; capture_begin(p, ptr);
const char *buf; }
/* 3 for GMT and 1 for ending 0 */
char timestamp_buf[UPB_TIMESTAMP_BASE_SIZE + 4];
static bool end_month(upb_json_parser *p, const char *ptr) {
if (!capture_end(p, ptr)) { if (!capture_end(p, ptr)) {
return false; return false;
} }
p->tm.tm_mon = parse_timestamp_number(p) - 1;
return true;
}
buf = accumulate_getptr(p, &len); static void start_day(upb_json_parser *p, const char *ptr) {
UPB_ASSERT(len == UPB_TIMESTAMP_BASE_SIZE); capture_begin(p, ptr);
memcpy(timestamp_buf, buf, UPB_TIMESTAMP_BASE_SIZE); }
memcpy(timestamp_buf + UPB_TIMESTAMP_BASE_SIZE, "GMT", 3);
timestamp_buf[UPB_TIMESTAMP_BASE_SIZE + 3] = 0;
#if defined __MINGW32__ || defined __MINGW64__ static bool end_day(upb_json_parser *p, const char *ptr) {
upb_status_seterrf(p->status, if (!capture_end(p, ptr)) {
"error parsing timestamp: mingw doesn't support strptime");
return false;
#else
/* Parse seconds */
if (strptime(timestamp_buf, "%FT%H:%M:%S%Z", &p->tm) == NULL) {
upb_status_seterrf(p->status, "error parsing timestamp: %s", buf);
return false; return false;
} }
#endif p->tm.tm_mday = parse_timestamp_number(p);
return true;
}
/* Clean up buffer */ static void start_hour(upb_json_parser *p, const char *ptr) {
multipart_end(p); capture_begin(p, ptr);
multipart_startaccum(p); }
static bool end_hour(upb_json_parser *p, const char *ptr) {
if (!capture_end(p, ptr)) {
return false;
}
p->tm.tm_hour = parse_timestamp_number(p);
return true; return true;
} }
static void start_minute(upb_json_parser *p, const char *ptr) {
capture_begin(p, ptr);
}
static bool end_minute(upb_json_parser *p, const char *ptr) {
if (!capture_end(p, ptr)) {
return false;
}
p->tm.tm_min = parse_timestamp_number(p);
return true;
}
static void start_second(upb_json_parser *p, const char *ptr) {
capture_begin(p, ptr);
}
static bool end_second(upb_json_parser *p, const char *ptr) {
if (!capture_end(p, ptr)) {
return false;
}
p->tm.tm_sec = parse_timestamp_number(p);
return true;
}
static void start_timestamp_base(upb_json_parser *p) {
memset(&p->tm, 0, sizeof(struct tm));
}
static void start_timestamp_fraction(upb_json_parser *p, const char *ptr) { static void start_timestamp_fraction(upb_json_parser *p, const char *ptr) {
capture_begin(p, ptr); capture_begin(p, ptr);
} }
@ -10460,17 +10530,11 @@ static bool start_fieldmask_path(upb_json_parser *p) {
/* Start a new parser frame: parser frames correspond one-to-one with /* Start a new parser frame: parser frames correspond one-to-one with
* handler frames, and string events occur in a sub-frame. */ * handler frames, and string events occur in a sub-frame. */
inner = p->top + 1; inner = start_jsonparser_frame(p);
sel = getsel_for_handlertype(p, UPB_HANDLER_STARTSTR); sel = getsel_for_handlertype(p, UPB_HANDLER_STARTSTR);
upb_sink_startstr(p->top->sink, sel, 0, &inner->sink); upb_sink_startstr(p->top->sink, sel, 0, &inner->sink);
inner->m = p->top->m; inner->m = p->top->m;
inner->f = p->top->f; inner->f = p->top->f;
inner->name_table = NULL;
inner->is_map = false;
inner->is_mapentry = false;
inner->is_any = false;
inner->any_frame = NULL;
inner->is_unknown_field = false;
p->top = inner; p->top = inner;
multipart_startaccum(p); multipart_startaccum(p);
@ -10603,17 +10667,12 @@ static bool handle_mapentry(upb_json_parser *p) {
mapfield = p->top->mapfield; mapfield = p->top->mapfield;
mapentrymsg = upb_fielddef_msgsubdef(mapfield); mapentrymsg = upb_fielddef_msgsubdef(mapfield);
inner = p->top + 1; inner = start_jsonparser_frame(p);
p->top->f = mapfield; p->top->f = mapfield;
sel = getsel_for_handlertype(p, UPB_HANDLER_STARTSUBMSG); sel = getsel_for_handlertype(p, UPB_HANDLER_STARTSUBMSG);
upb_sink_startsubmsg(p->top->sink, sel, &inner->sink); upb_sink_startsubmsg(p->top->sink, sel, &inner->sink);
inner->m = mapentrymsg; inner->m = mapentrymsg;
inner->name_table = NULL;
inner->mapfield = mapfield; inner->mapfield = mapfield;
inner->is_map = false;
inner->is_any = false;
inner->any_frame = NULL;
inner->is_unknown_field = false;
/* Don't set this to true *yet* -- we reuse parsing handlers below to push /* Don't set this to true *yet* -- we reuse parsing handlers below to push
* the key field value to the sink, and these handlers will pop the frame * the key field value to the sink, and these handlers will pop the frame
@ -10728,15 +10787,7 @@ static bool start_subobject(upb_json_parser *p) {
upb_jsonparser_frame *inner; upb_jsonparser_frame *inner;
if (!check_stack(p)) return false; if (!check_stack(p)) return false;
inner = p->top + 1; p->top = start_jsonparser_frame(p);
inner->m = NULL;
inner->f = NULL;
inner->is_map = false;
inner->is_mapentry = false;
inner->is_any = false;
inner->any_frame = NULL;
inner->is_unknown_field = false;
p->top = inner;
return true; return true;
} }
@ -10748,18 +10799,12 @@ static bool start_subobject(upb_json_parser *p) {
* context. */ * context. */
if (!check_stack(p)) return false; if (!check_stack(p)) return false;
inner = p->top + 1; inner = start_jsonparser_frame(p);
sel = getsel_for_handlertype(p, UPB_HANDLER_STARTSEQ); sel = getsel_for_handlertype(p, UPB_HANDLER_STARTSEQ);
upb_sink_startseq(p->top->sink, sel, &inner->sink); upb_sink_startseq(p->top->sink, sel, &inner->sink);
inner->m = upb_fielddef_msgsubdef(p->top->f); inner->m = upb_fielddef_msgsubdef(p->top->f);
inner->name_table = NULL;
inner->mapfield = p->top->f; inner->mapfield = p->top->f;
inner->f = NULL;
inner->is_map = true; inner->is_map = true;
inner->is_mapentry = false;
inner->is_any = false;
inner->any_frame = NULL;
inner->is_unknown_field = false;
p->top = inner; p->top = inner;
return true; return true;
@ -10771,16 +10816,11 @@ static bool start_subobject(upb_json_parser *p) {
* context. */ * context. */
if (!check_stack(p)) return false; if (!check_stack(p)) return false;
inner = p->top + 1; inner = start_jsonparser_frame(p);
sel = getsel_for_handlertype(p, UPB_HANDLER_STARTSUBMSG); sel = getsel_for_handlertype(p, UPB_HANDLER_STARTSUBMSG);
upb_sink_startsubmsg(p->top->sink, sel, &inner->sink); upb_sink_startsubmsg(p->top->sink, sel, &inner->sink);
inner->m = upb_fielddef_msgsubdef(p->top->f); inner->m = upb_fielddef_msgsubdef(p->top->f);
set_name_table(p, inner); set_name_table(p, inner);
inner->f = NULL;
inner->is_map = false;
inner->is_mapentry = false;
inner->is_unknown_field = false;
p->top = inner; p->top = inner;
if (is_wellknown_msg(p, UPB_WELLKNOWN_ANY)) { if (is_wellknown_msg(p, UPB_WELLKNOWN_ANY)) {
@ -10877,10 +10917,14 @@ static bool start_array(upb_json_parser *p) {
} else { } else {
return false; return false;
} }
} else if (is_wellknown_field(p, UPB_WELLKNOWN_LISTVALUE)) { } else if (is_wellknown_field(p, UPB_WELLKNOWN_LISTVALUE) &&
(!upb_fielddef_isseq(p->top->f) ||
p->top->is_repeated)) {
if (!start_subobject(p)) return false; if (!start_subobject(p)) return false;
start_listvalue_object(p); start_listvalue_object(p);
} else if (is_wellknown_field(p, UPB_WELLKNOWN_VALUE)) { } else if (is_wellknown_field(p, UPB_WELLKNOWN_VALUE) &&
(!upb_fielddef_isseq(p->top->f) ||
p->top->is_repeated)) {
if (!start_subobject(p)) return false; if (!start_subobject(p)) return false;
start_value_object(p, VALUE_LISTVALUE); start_value_object(p, VALUE_LISTVALUE);
if (!start_subobject(p)) return false; if (!start_subobject(p)) return false;
@ -10888,14 +10932,7 @@ static bool start_array(upb_json_parser *p) {
} }
if (p->top->is_unknown_field) { if (p->top->is_unknown_field) {
inner = p->top + 1; inner = start_jsonparser_frame(p);
inner->m = NULL;
inner->name_table = NULL;
inner->f = NULL;
inner->is_map = false;
inner->is_mapentry = false;
inner->is_any = false;
inner->any_frame = NULL;
inner->is_unknown_field = true; inner->is_unknown_field = true;
p->top = inner; p->top = inner;
@ -10911,17 +10948,12 @@ static bool start_array(upb_json_parser *p) {
if (!check_stack(p)) return false; if (!check_stack(p)) return false;
inner = p->top + 1; inner = start_jsonparser_frame(p);
sel = getsel_for_handlertype(p, UPB_HANDLER_STARTSEQ); sel = getsel_for_handlertype(p, UPB_HANDLER_STARTSEQ);
upb_sink_startseq(p->top->sink, sel, &inner->sink); upb_sink_startseq(p->top->sink, sel, &inner->sink);
inner->m = p->top->m; inner->m = p->top->m;
inner->name_table = NULL;
inner->f = p->top->f; inner->f = p->top->f;
inner->is_map = false; inner->is_repeated = true;
inner->is_mapentry = false;
inner->is_any = false;
inner->any_frame = NULL;
inner->is_unknown_field = false;
p->top = inner; p->top = inner;
return true; return true;
@ -11287,27 +11319,30 @@ static bool does_fieldmask_end(upb_json_parser *p) {
* final state once, when the closing '"' is seen. */ * final state once, when the closing '"' is seen. */
#line 2695 "upb/json/parser.rl" #line 2749 "upb/json/parser.rl"
#line 2521 "upb/json/parser.c" #line 2552 "upb/json/parser.c"
static const char _json_actions[] = { static const char _json_actions[] = {
0, 1, 0, 1, 1, 1, 3, 1, 0, 1, 0, 1, 1, 1, 3, 1,
4, 1, 6, 1, 7, 1, 8, 1, 4, 1, 6, 1, 7, 1, 8, 1,
9, 1, 10, 1, 11, 1, 12, 1, 9, 1, 11, 1, 12, 1, 13, 1,
13, 1, 24, 1, 26, 1, 28, 1, 14, 1, 15, 1, 16, 1, 17, 1,
29, 1, 31, 1, 32, 1, 33, 1, 18, 1, 19, 1, 20, 1, 22, 1,
35, 1, 37, 1, 38, 1, 39, 1, 23, 1, 24, 1, 35, 1, 37, 1,
40, 1, 42, 1, 43, 2, 4, 9, 39, 1, 40, 1, 42, 1, 43, 1,
2, 5, 6, 2, 7, 3, 2, 7, 44, 1, 46, 1, 48, 1, 49, 1,
9, 2, 14, 15, 2, 16, 17, 2, 50, 1, 51, 1, 53, 1, 54, 2,
18, 19, 2, 21, 23, 2, 22, 20, 4, 9, 2, 5, 6, 2, 7, 3,
2, 27, 25, 2, 29, 31, 2, 34, 2, 7, 9, 2, 21, 26, 2, 25,
2, 2, 35, 43, 2, 36, 25, 2, 10, 2, 27, 28, 2, 29, 30, 2,
38, 43, 2, 39, 43, 2, 40, 43, 32, 34, 2, 33, 31, 2, 38, 36,
2, 41, 30, 2, 42, 43, 3, 21, 2, 40, 42, 2, 45, 2, 2, 46,
23, 24, 4, 14, 15, 16, 17 54, 2, 47, 36, 2, 49, 54, 2,
50, 54, 2, 51, 54, 2, 52, 41,
2, 53, 54, 3, 32, 34, 35, 4,
21, 26, 27, 28
}; };
static const short _json_key_offsets[] = { static const short _json_key_offsets[] = {
@ -11491,30 +11526,30 @@ static const char _json_trans_targs[] = {
106 106
}; };
static const char _json_trans_actions[] = { static const unsigned char _json_trans_actions[] = {
0, 0, 92, 86, 35, 0, 0, 0, 0, 0, 113, 107, 53, 0, 0, 0,
104, 41, 27, 0, 37, 0, 0, 0, 125, 59, 45, 0, 55, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 80, 33, 29, 0, 0, 27, 0, 0, 101, 51, 47, 0, 0, 45,
31, 31, 83, 0, 0, 0, 0, 0, 49, 49, 104, 0, 0, 0, 0, 0,
3, 0, 0, 0, 0, 0, 5, 15, 3, 0, 0, 0, 0, 0, 5, 15,
0, 0, 53, 7, 13, 0, 56, 9, 0, 0, 71, 7, 13, 0, 74, 9,
9, 9, 59, 62, 11, 17, 17, 17, 9, 9, 77, 80, 11, 37, 37, 37,
0, 0, 0, 19, 0, 21, 23, 0, 0, 0, 0, 39, 0, 41, 86, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 19, 0, 21, 23, 0,
0, 0, 0, 0, 0, 0, 0, 0, 25, 27, 0, 29, 31, 0, 33, 35,
0, 114, 65, 114, 0, 0, 0, 0, 0, 135, 83, 135, 0, 0, 0, 0,
0, 71, 0, 68, 68, 77, 25, 0, 0, 92, 0, 89, 89, 98, 43, 0,
110, 74, 92, 86, 35, 0, 0, 0, 131, 95, 113, 107, 53, 0, 0, 0,
104, 41, 51, 89, 27, 0, 37, 0, 125, 59, 69, 110, 45, 0, 55, 0,
0, 0, 0, 0, 0, 98, 0, 0, 0, 0, 0, 0, 0, 119, 0, 0,
0, 101, 0, 0, 0, 95, 0, 80, 0, 122, 0, 0, 0, 116, 0, 101,
33, 29, 0, 0, 27, 31, 31, 83, 51, 47, 0, 0, 45, 49, 49, 104,
0, 0, 107, 0, 39, 45, 47, 43, 0, 0, 128, 0, 57, 63, 65, 61,
49 67
}; };
static const char _json_eof_actions[] = { static const unsigned char _json_eof_actions[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@ -11528,7 +11563,7 @@ static const char _json_eof_actions[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 39, 45, 47, 43, 49, 0, 0, 0, 57, 63, 65, 61, 67,
0, 0, 0, 0, 0, 0 0, 0, 0, 0, 0, 0
}; };
@ -11543,7 +11578,7 @@ static const int json_en_value_machine = 78;
static const int json_en_main = 1; static const int json_en_main = 1;
#line 2698 "upb/json/parser.rl" #line 2752 "upb/json/parser.rl"
size_t parse(void *closure, const void *hd, const char *buf, size_t size, size_t parse(void *closure, const void *hd, const char *buf, size_t size,
const upb_bufhandle *handle) { const upb_bufhandle *handle) {
@ -11566,7 +11601,7 @@ size_t parse(void *closure, const void *hd, const char *buf, size_t size,
capture_resume(parser, buf); capture_resume(parser, buf);
#line 2796 "upb/json/parser.c" #line 2830 "upb/json/parser.c"
{ {
int _klen; int _klen;
unsigned int _trans; unsigned int _trans;
@ -11641,103 +11676,147 @@ _match:
switch ( *_acts++ ) switch ( *_acts++ )
{ {
case 1: case 1:
#line 2526 "upb/json/parser.rl" #line 2557 "upb/json/parser.rl"
{ p--; {cs = stack[--top]; goto _again;} } { p--; {cs = stack[--top]; goto _again;} }
break; break;
case 2: case 2:
#line 2528 "upb/json/parser.rl" #line 2559 "upb/json/parser.rl"
{ p--; {stack[top++] = cs; cs = 23;goto _again;} } { p--; {stack[top++] = cs; cs = 23;goto _again;} }
break; break;
case 3: case 3:
#line 2532 "upb/json/parser.rl" #line 2563 "upb/json/parser.rl"
{ start_text(parser, p); } { start_text(parser, p); }
break; break;
case 4: case 4:
#line 2533 "upb/json/parser.rl" #line 2564 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_text(parser, p)); } { CHECK_RETURN_TOP(end_text(parser, p)); }
break; break;
case 5: case 5:
#line 2539 "upb/json/parser.rl" #line 2570 "upb/json/parser.rl"
{ start_hex(parser); } { start_hex(parser); }
break; break;
case 6: case 6:
#line 2540 "upb/json/parser.rl" #line 2571 "upb/json/parser.rl"
{ hexdigit(parser, p); } { hexdigit(parser, p); }
break; break;
case 7: case 7:
#line 2541 "upb/json/parser.rl" #line 2572 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_hex(parser)); } { CHECK_RETURN_TOP(end_hex(parser)); }
break; break;
case 8: case 8:
#line 2547 "upb/json/parser.rl" #line 2578 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(escape(parser, p)); } { CHECK_RETURN_TOP(escape(parser, p)); }
break; break;
case 9: case 9:
#line 2553 "upb/json/parser.rl" #line 2584 "upb/json/parser.rl"
{ p--; {cs = stack[--top]; goto _again;} } { p--; {cs = stack[--top]; goto _again;} }
break; break;
case 10: case 10:
#line 2565 "upb/json/parser.rl" #line 2589 "upb/json/parser.rl"
{ start_duration_base(parser, p); } { start_year(parser, p); }
break; break;
case 11: case 11:
#line 2566 "upb/json/parser.rl" #line 2590 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_duration_base(parser, p)); } { CHECK_RETURN_TOP(end_year(parser, p)); }
break; break;
case 12: case 12:
#line 2568 "upb/json/parser.rl" #line 2594 "upb/json/parser.rl"
{ p--; {cs = stack[--top]; goto _again;} } { start_month(parser, p); }
break; break;
case 13: case 13:
#line 2573 "upb/json/parser.rl" #line 2595 "upb/json/parser.rl"
{ start_timestamp_base(parser, p); } { CHECK_RETURN_TOP(end_month(parser, p)); }
break; break;
case 14: case 14:
#line 2574 "upb/json/parser.rl" #line 2599 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_timestamp_base(parser, p)); } { start_day(parser, p); }
break; break;
case 15: case 15:
#line 2576 "upb/json/parser.rl" #line 2600 "upb/json/parser.rl"
{ start_timestamp_fraction(parser, p); } { CHECK_RETURN_TOP(end_day(parser, p)); }
break; break;
case 16: case 16:
#line 2577 "upb/json/parser.rl" #line 2604 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_timestamp_fraction(parser, p)); } { start_hour(parser, p); }
break; break;
case 17: case 17:
#line 2579 "upb/json/parser.rl" #line 2605 "upb/json/parser.rl"
{ start_timestamp_zone(parser, p); } { CHECK_RETURN_TOP(end_hour(parser, p)); }
break; break;
case 18: case 18:
#line 2580 "upb/json/parser.rl" #line 2609 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_timestamp_zone(parser, p)); } { start_minute(parser, p); }
break; break;
case 19: case 19:
#line 2582 "upb/json/parser.rl" #line 2610 "upb/json/parser.rl"
{ p--; {cs = stack[--top]; goto _again;} } { CHECK_RETURN_TOP(end_minute(parser, p)); }
break; break;
case 20: case 20:
#line 2587 "upb/json/parser.rl" #line 2614 "upb/json/parser.rl"
{ start_fieldmask_path_text(parser, p); } { start_second(parser, p); }
break; break;
case 21: case 21:
#line 2588 "upb/json/parser.rl" #line 2615 "upb/json/parser.rl"
{ end_fieldmask_path_text(parser, p); } { CHECK_RETURN_TOP(end_second(parser, p)); }
break; break;
case 22: case 22:
#line 2593 "upb/json/parser.rl" #line 2620 "upb/json/parser.rl"
{ start_fieldmask_path(parser); } { start_duration_base(parser, p); }
break; break;
case 23: case 23:
#line 2594 "upb/json/parser.rl" #line 2621 "upb/json/parser.rl"
{ end_fieldmask_path(parser); } { CHECK_RETURN_TOP(end_duration_base(parser, p)); }
break; break;
case 24: case 24:
#line 2600 "upb/json/parser.rl" #line 2623 "upb/json/parser.rl"
{ p--; {cs = stack[--top]; goto _again;} } { p--; {cs = stack[--top]; goto _again;} }
break; break;
case 25: case 25:
#line 2605 "upb/json/parser.rl" #line 2628 "upb/json/parser.rl"
{ start_timestamp_base(parser); }
break;
case 26:
#line 2630 "upb/json/parser.rl"
{ start_timestamp_fraction(parser, p); }
break;
case 27:
#line 2631 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_timestamp_fraction(parser, p)); }
break;
case 28:
#line 2633 "upb/json/parser.rl"
{ start_timestamp_zone(parser, p); }
break;
case 29:
#line 2634 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_timestamp_zone(parser, p)); }
break;
case 30:
#line 2636 "upb/json/parser.rl"
{ p--; {cs = stack[--top]; goto _again;} }
break;
case 31:
#line 2641 "upb/json/parser.rl"
{ start_fieldmask_path_text(parser, p); }
break;
case 32:
#line 2642 "upb/json/parser.rl"
{ end_fieldmask_path_text(parser, p); }
break;
case 33:
#line 2647 "upb/json/parser.rl"
{ start_fieldmask_path(parser); }
break;
case 34:
#line 2648 "upb/json/parser.rl"
{ end_fieldmask_path(parser); }
break;
case 35:
#line 2654 "upb/json/parser.rl"
{ p--; {cs = stack[--top]; goto _again;} }
break;
case 36:
#line 2659 "upb/json/parser.rl"
{ {
if (is_wellknown_msg(parser, UPB_WELLKNOWN_TIMESTAMP)) { if (is_wellknown_msg(parser, UPB_WELLKNOWN_TIMESTAMP)) {
{stack[top++] = cs; cs = 47;goto _again;} {stack[top++] = cs; cs = 47;goto _again;}
@ -11750,12 +11829,12 @@ _match:
} }
} }
break; break;
case 26: case 37:
#line 2618 "upb/json/parser.rl" #line 2672 "upb/json/parser.rl"
{ p--; {stack[top++] = cs; cs = 78;goto _again;} } { p--; {stack[top++] = cs; cs = 78;goto _again;} }
break; break;
case 27: case 38:
#line 2623 "upb/json/parser.rl" #line 2677 "upb/json/parser.rl"
{ {
if (is_wellknown_msg(parser, UPB_WELLKNOWN_ANY)) { if (is_wellknown_msg(parser, UPB_WELLKNOWN_ANY)) {
start_any_member(parser, p); start_any_member(parser, p);
@ -11764,12 +11843,12 @@ _match:
} }
} }
break; break;
case 28: case 39:
#line 2630 "upb/json/parser.rl" #line 2684 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_membername(parser)); } { CHECK_RETURN_TOP(end_membername(parser)); }
break; break;
case 29: case 40:
#line 2633 "upb/json/parser.rl" #line 2687 "upb/json/parser.rl"
{ {
if (is_wellknown_msg(parser, UPB_WELLKNOWN_ANY)) { if (is_wellknown_msg(parser, UPB_WELLKNOWN_ANY)) {
end_any_member(parser, p); end_any_member(parser, p);
@ -11778,8 +11857,8 @@ _match:
} }
} }
break; break;
case 30: case 41:
#line 2644 "upb/json/parser.rl" #line 2698 "upb/json/parser.rl"
{ {
if (is_wellknown_msg(parser, UPB_WELLKNOWN_ANY)) { if (is_wellknown_msg(parser, UPB_WELLKNOWN_ANY)) {
start_any_object(parser, p); start_any_object(parser, p);
@ -11788,8 +11867,8 @@ _match:
} }
} }
break; break;
case 31: case 42:
#line 2653 "upb/json/parser.rl" #line 2707 "upb/json/parser.rl"
{ {
if (is_wellknown_msg(parser, UPB_WELLKNOWN_ANY)) { if (is_wellknown_msg(parser, UPB_WELLKNOWN_ANY)) {
CHECK_RETURN_TOP(end_any_object(parser, p)); CHECK_RETURN_TOP(end_any_object(parser, p));
@ -11798,55 +11877,55 @@ _match:
} }
} }
break; break;
case 32: case 43:
#line 2665 "upb/json/parser.rl" #line 2719 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(start_array(parser)); } { CHECK_RETURN_TOP(start_array(parser)); }
break; break;
case 33: case 44:
#line 2669 "upb/json/parser.rl" #line 2723 "upb/json/parser.rl"
{ end_array(parser); } { end_array(parser); }
break; break;
case 34: case 45:
#line 2674 "upb/json/parser.rl" #line 2728 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(start_number(parser, p)); } { CHECK_RETURN_TOP(start_number(parser, p)); }
break; break;
case 35: case 46:
#line 2675 "upb/json/parser.rl" #line 2729 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_number(parser, p)); } { CHECK_RETURN_TOP(end_number(parser, p)); }
break; break;
case 36: case 47:
#line 2677 "upb/json/parser.rl" #line 2731 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(start_stringval(parser)); } { CHECK_RETURN_TOP(start_stringval(parser)); }
break; break;
case 37: case 48:
#line 2678 "upb/json/parser.rl" #line 2732 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_stringval(parser)); } { CHECK_RETURN_TOP(end_stringval(parser)); }
break; break;
case 38: case 49:
#line 2680 "upb/json/parser.rl" #line 2734 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_bool(parser, true)); } { CHECK_RETURN_TOP(end_bool(parser, true)); }
break; break;
case 39: case 50:
#line 2682 "upb/json/parser.rl" #line 2736 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_bool(parser, false)); } { CHECK_RETURN_TOP(end_bool(parser, false)); }
break; break;
case 40: case 51:
#line 2684 "upb/json/parser.rl" #line 2738 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_null(parser)); } { CHECK_RETURN_TOP(end_null(parser)); }
break; break;
case 41: case 52:
#line 2686 "upb/json/parser.rl" #line 2740 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(start_subobject_full(parser)); } { CHECK_RETURN_TOP(start_subobject_full(parser)); }
break; break;
case 42: case 53:
#line 2687 "upb/json/parser.rl" #line 2741 "upb/json/parser.rl"
{ end_subobject_full(parser); } { end_subobject_full(parser); }
break; break;
case 43: case 54:
#line 2692 "upb/json/parser.rl" #line 2746 "upb/json/parser.rl"
{ p--; {cs = stack[--top]; goto _again;} } { p--; {cs = stack[--top]; goto _again;} }
break; break;
#line 3076 "upb/json/parser.c" #line 3154 "upb/json/parser.c"
} }
} }
@ -11863,32 +11942,32 @@ _again:
while ( __nacts-- > 0 ) { while ( __nacts-- > 0 ) {
switch ( *__acts++ ) { switch ( *__acts++ ) {
case 0: case 0:
#line 2524 "upb/json/parser.rl" #line 2555 "upb/json/parser.rl"
{ p--; {cs = stack[--top]; if ( p == pe ) { p--; {cs = stack[--top]; if ( p == pe )
goto _test_eof; goto _test_eof;
goto _again;} } goto _again;} }
break; break;
case 35: case 46:
#line 2675 "upb/json/parser.rl" #line 2729 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_number(parser, p)); } { CHECK_RETURN_TOP(end_number(parser, p)); }
break; break;
case 38: case 49:
#line 2680 "upb/json/parser.rl" #line 2734 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_bool(parser, true)); } { CHECK_RETURN_TOP(end_bool(parser, true)); }
break; break;
case 39: case 50:
#line 2682 "upb/json/parser.rl" #line 2736 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_bool(parser, false)); } { CHECK_RETURN_TOP(end_bool(parser, false)); }
break; break;
case 40: case 51:
#line 2684 "upb/json/parser.rl" #line 2738 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_null(parser)); } { CHECK_RETURN_TOP(end_null(parser)); }
break; break;
case 42: case 53:
#line 2687 "upb/json/parser.rl" #line 2741 "upb/json/parser.rl"
{ end_subobject_full(parser); } { end_subobject_full(parser); }
break; break;
#line 3118 "upb/json/parser.c" #line 3196 "upb/json/parser.c"
} }
} }
} }
@ -11896,7 +11975,7 @@ goto _again;} }
_out: {} _out: {}
} }
#line 2720 "upb/json/parser.rl" #line 2774 "upb/json/parser.rl"
if (p != pe) { if (p != pe) {
upb_status_seterrf(parser->status, "Parse error at '%.*s'\n", pe - p, p); upb_status_seterrf(parser->status, "Parse error at '%.*s'\n", pe - p, p);
@ -11935,22 +12014,17 @@ static void json_parser_reset(upb_json_parser *p) {
int top; int top;
p->top = p->stack; p->top = p->stack;
p->top->f = NULL; init_frame(p->top);
p->top->is_map = false;
p->top->is_mapentry = false;
p->top->is_any = false;
p->top->any_frame = NULL;
p->top->is_unknown_field = false;
/* Emit Ragel initialization of the parser. */ /* Emit Ragel initialization of the parser. */
#line 3174 "upb/json/parser.c" #line 3247 "upb/json/parser.c"
{ {
cs = json_start; cs = json_start;
top = 0; top = 0;
} }
#line 2767 "upb/json/parser.rl" #line 2816 "upb/json/parser.rl"
p->current_state = cs; p->current_state = cs;
p->parser_top = top; p->parser_top = top;
accumulate_clear(p); accumulate_clear(p);
@ -12559,9 +12633,14 @@ static size_t putbytes(void *closure, const void *handler_data, const char *str,
UPB_UNUSED(handler_data); UPB_UNUSED(handler_data);
UPB_UNUSED(handle); UPB_UNUSED(handle);
print_data(p, "\"", 1);
while (remaining > 2) { while (remaining > 2) {
/* TODO(haberman): handle encoded lengths > sizeof(data) */ if (limit - to < 4) {
UPB_ASSERT((limit - to) >= 4); bytes = to - data;
putstring(p, data, bytes);
to = data;
}
to[0] = base64[from[0] >> 2]; to[0] = base64[from[0] >> 2];
to[1] = base64[((from[0] & 0x3) << 4) | (from[1] >> 4)]; to[1] = base64[((from[0] & 0x3) << 4) | (from[1] >> 4)];
@ -12593,7 +12672,6 @@ static size_t putbytes(void *closure, const void *handler_data, const char *str,
} }
bytes = to - data; bytes = to - data;
print_data(p, "\"", 1);
putstring(p, data, bytes); putstring(p, data, bytes);
print_data(p, "\"", 1); print_data(p, "\"", 1);
return len; return len;

@ -1,11 +1,4 @@
/* Amalgamated source file */ /* Amalgamated source file */
// php.h intentionally defined NDEBUG. We have to define this macro in order to
// be used together with php.h
#ifndef NDEBUG
#define NDEBUG
#endif
#include <stdint.h> #include <stdint.h>
#ifndef UINTPTR_MAX #ifndef UINTPTR_MAX
#error must include stdint.h first #error must include stdint.h first
@ -869,7 +862,8 @@ UPB_INLINE bool _upb_has_oneof_field(const void *msg, size_t case_ofs, int32_t n
extern "C" { extern "C" {
#endif #endif
bool upb_decode(upb_strview buf, upb_msg *msg, const upb_msglayout *l); bool upb_decode(const char *buf, size_t size, upb_msg *msg,
const upb_msglayout *l);
#ifdef __cplusplus #ifdef __cplusplus
} /* extern "C" */ } /* extern "C" */
@ -1035,14 +1029,16 @@ typedef enum {
google_protobuf_MethodOptions_IDEMPOTENT = 2 google_protobuf_MethodOptions_IDEMPOTENT = 2
} google_protobuf_MethodOptions_IdempotencyLevel; } google_protobuf_MethodOptions_IdempotencyLevel;
/* google.protobuf.FileDescriptorSet */ /* google.protobuf.FileDescriptorSet */
UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_new(upb_arena *arena) { UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_new(upb_arena *arena) {
return (google_protobuf_FileDescriptorSet *)upb_msg_new(&google_protobuf_FileDescriptorSet_msginit, arena); return (google_protobuf_FileDescriptorSet *)upb_msg_new(&google_protobuf_FileDescriptorSet_msginit, arena);
} }
UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_FileDescriptorSet *ret = google_protobuf_FileDescriptorSet_new(arena); google_protobuf_FileDescriptorSet *ret = google_protobuf_FileDescriptorSet_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_FileDescriptorSet_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_FileDescriptorSet_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_FileDescriptorSet_serialize(const google_protobuf_FileDescriptorSet *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_FileDescriptorSet_serialize(const google_protobuf_FileDescriptorSet *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_FileDescriptorSet_msginit, arena, len); return upb_encode(msg, &google_protobuf_FileDescriptorSet_msginit, arena, len);
@ -1070,9 +1066,10 @@ UPB_INLINE struct google_protobuf_FileDescriptorProto* google_protobuf_FileDescr
UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_new(upb_arena *arena) { UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_new(upb_arena *arena) {
return (google_protobuf_FileDescriptorProto *)upb_msg_new(&google_protobuf_FileDescriptorProto_msginit, arena); return (google_protobuf_FileDescriptorProto *)upb_msg_new(&google_protobuf_FileDescriptorProto_msginit, arena);
} }
UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_FileDescriptorProto *ret = google_protobuf_FileDescriptorProto_new(arena); google_protobuf_FileDescriptorProto *ret = google_protobuf_FileDescriptorProto_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_FileDescriptorProto_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_FileDescriptorProto_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_FileDescriptorProto_serialize(const google_protobuf_FileDescriptorProto *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_FileDescriptorProto_serialize(const google_protobuf_FileDescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_FileDescriptorProto_msginit, arena, len); return upb_encode(msg, &google_protobuf_FileDescriptorProto_msginit, arena, len);
@ -1223,9 +1220,10 @@ UPB_INLINE void google_protobuf_FileDescriptorProto_set_syntax(google_protobuf_F
UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_new(upb_arena *arena) { UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_new(upb_arena *arena) {
return (google_protobuf_DescriptorProto *)upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena); return (google_protobuf_DescriptorProto *)upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena);
} }
UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_DescriptorProto *ret = google_protobuf_DescriptorProto_new(arena); google_protobuf_DescriptorProto *ret = google_protobuf_DescriptorProto_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_DescriptorProto_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_DescriptorProto_serialize(const google_protobuf_DescriptorProto *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_DescriptorProto_serialize(const google_protobuf_DescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_DescriptorProto_msginit, arena, len); return upb_encode(msg, &google_protobuf_DescriptorProto_msginit, arena, len);
@ -1369,9 +1367,10 @@ UPB_INLINE bool google_protobuf_DescriptorProto_add_reserved_name(google_protobu
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_new(upb_arena *arena) { UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_new(upb_arena *arena) {
return (google_protobuf_DescriptorProto_ExtensionRange *)upb_msg_new(&google_protobuf_DescriptorProto_ExtensionRange_msginit, arena); return (google_protobuf_DescriptorProto_ExtensionRange *)upb_msg_new(&google_protobuf_DescriptorProto_ExtensionRange_msginit, arena);
} }
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_DescriptorProto_ExtensionRange *ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena); google_protobuf_DescriptorProto_ExtensionRange *ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_DescriptorProto_ExtensionRange_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ExtensionRange_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_DescriptorProto_ExtensionRange_serialize(const google_protobuf_DescriptorProto_ExtensionRange *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_DescriptorProto_ExtensionRange_serialize(const google_protobuf_DescriptorProto_ExtensionRange *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_DescriptorProto_ExtensionRange_msginit, arena, len); return upb_encode(msg, &google_protobuf_DescriptorProto_ExtensionRange_msginit, arena, len);
@ -1412,9 +1411,10 @@ UPB_INLINE struct google_protobuf_ExtensionRangeOptions* google_protobuf_Descrip
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_new(upb_arena *arena) { UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_new(upb_arena *arena) {
return (google_protobuf_DescriptorProto_ReservedRange *)upb_msg_new(&google_protobuf_DescriptorProto_ReservedRange_msginit, arena); return (google_protobuf_DescriptorProto_ReservedRange *)upb_msg_new(&google_protobuf_DescriptorProto_ReservedRange_msginit, arena);
} }
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_DescriptorProto_ReservedRange *ret = google_protobuf_DescriptorProto_ReservedRange_new(arena); google_protobuf_DescriptorProto_ReservedRange *ret = google_protobuf_DescriptorProto_ReservedRange_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_DescriptorProto_ReservedRange_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ReservedRange_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_DescriptorProto_ReservedRange_serialize(const google_protobuf_DescriptorProto_ReservedRange *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_DescriptorProto_ReservedRange_serialize(const google_protobuf_DescriptorProto_ReservedRange *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_DescriptorProto_ReservedRange_msginit, arena, len); return upb_encode(msg, &google_protobuf_DescriptorProto_ReservedRange_msginit, arena, len);
@ -1440,9 +1440,10 @@ UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_end(google_pro
UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_new(upb_arena *arena) { UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_new(upb_arena *arena) {
return (google_protobuf_ExtensionRangeOptions *)upb_msg_new(&google_protobuf_ExtensionRangeOptions_msginit, arena); return (google_protobuf_ExtensionRangeOptions *)upb_msg_new(&google_protobuf_ExtensionRangeOptions_msginit, arena);
} }
UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_ExtensionRangeOptions *ret = google_protobuf_ExtensionRangeOptions_new(arena); google_protobuf_ExtensionRangeOptions *ret = google_protobuf_ExtensionRangeOptions_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_ExtensionRangeOptions_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_ExtensionRangeOptions_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_ExtensionRangeOptions_serialize(const google_protobuf_ExtensionRangeOptions *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_ExtensionRangeOptions_serialize(const google_protobuf_ExtensionRangeOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_ExtensionRangeOptions_msginit, arena, len); return upb_encode(msg, &google_protobuf_ExtensionRangeOptions_msginit, arena, len);
@ -1470,9 +1471,10 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_Extension
UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_new(upb_arena *arena) { UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_new(upb_arena *arena) {
return (google_protobuf_FieldDescriptorProto *)upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena); return (google_protobuf_FieldDescriptorProto *)upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena);
} }
UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_FieldDescriptorProto *ret = google_protobuf_FieldDescriptorProto_new(arena); google_protobuf_FieldDescriptorProto *ret = google_protobuf_FieldDescriptorProto_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_FieldDescriptorProto_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_FieldDescriptorProto_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_FieldDescriptorProto_serialize(const google_protobuf_FieldDescriptorProto *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_FieldDescriptorProto_serialize(const google_protobuf_FieldDescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_FieldDescriptorProto_msginit, arena, len); return upb_encode(msg, &google_protobuf_FieldDescriptorProto_msginit, arena, len);
@ -1485,9 +1487,9 @@ UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_extendee(const googl
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_number(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 3); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_number(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 3); }
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(24, 24)); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(24, 24)); }
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_label(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 1); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_label(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 1); }
UPB_INLINE google_protobuf_FieldDescriptorProto_Label google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, google_protobuf_FieldDescriptorProto_Label, UPB_SIZE(8, 8)); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); }
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 2); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 2); }
UPB_INLINE google_protobuf_FieldDescriptorProto_Type google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, google_protobuf_FieldDescriptorProto_Type, UPB_SIZE(16, 16)); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)); }
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 7); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 7); }
UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(48, 64)); } UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(48, 64)); }
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 8); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 8); }
@ -1511,13 +1513,13 @@ UPB_INLINE void google_protobuf_FieldDescriptorProto_set_number(google_protobuf_
_upb_sethas(msg, 3); _upb_sethas(msg, 3);
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(24, 24)) = value; UPB_FIELD_AT(msg, int32_t, UPB_SIZE(24, 24)) = value;
} }
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_label(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldDescriptorProto_Label value) { UPB_INLINE void google_protobuf_FieldDescriptorProto_set_label(google_protobuf_FieldDescriptorProto *msg, int32_t value) {
_upb_sethas(msg, 1); _upb_sethas(msg, 1);
UPB_FIELD_AT(msg, google_protobuf_FieldDescriptorProto_Label, UPB_SIZE(8, 8)) = value; UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value;
} }
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldDescriptorProto_Type value) { UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type(google_protobuf_FieldDescriptorProto *msg, int32_t value) {
_upb_sethas(msg, 2); _upb_sethas(msg, 2);
UPB_FIELD_AT(msg, google_protobuf_FieldDescriptorProto_Type, UPB_SIZE(16, 16)) = value; UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)) = value;
} }
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value) { UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value) {
_upb_sethas(msg, 7); _upb_sethas(msg, 7);
@ -1555,9 +1557,10 @@ UPB_INLINE void google_protobuf_FieldDescriptorProto_set_json_name(google_protob
UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_new(upb_arena *arena) { UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_new(upb_arena *arena) {
return (google_protobuf_OneofDescriptorProto *)upb_msg_new(&google_protobuf_OneofDescriptorProto_msginit, arena); return (google_protobuf_OneofDescriptorProto *)upb_msg_new(&google_protobuf_OneofDescriptorProto_msginit, arena);
} }
UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_OneofDescriptorProto *ret = google_protobuf_OneofDescriptorProto_new(arena); google_protobuf_OneofDescriptorProto *ret = google_protobuf_OneofDescriptorProto_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_OneofDescriptorProto_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_OneofDescriptorProto_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_OneofDescriptorProto_serialize(const google_protobuf_OneofDescriptorProto *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_OneofDescriptorProto_serialize(const google_protobuf_OneofDescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_OneofDescriptorProto_msginit, arena, len); return upb_encode(msg, &google_protobuf_OneofDescriptorProto_msginit, arena, len);
@ -1592,9 +1595,10 @@ UPB_INLINE struct google_protobuf_OneofOptions* google_protobuf_OneofDescriptorP
UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_new(upb_arena *arena) { UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_new(upb_arena *arena) {
return (google_protobuf_EnumDescriptorProto *)upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena); return (google_protobuf_EnumDescriptorProto *)upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena);
} }
UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_EnumDescriptorProto *ret = google_protobuf_EnumDescriptorProto_new(arena); google_protobuf_EnumDescriptorProto *ret = google_protobuf_EnumDescriptorProto_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_EnumDescriptorProto_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_EnumDescriptorProto_serialize(const google_protobuf_EnumDescriptorProto *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_EnumDescriptorProto_serialize(const google_protobuf_EnumDescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_EnumDescriptorProto_msginit, arena, len); return upb_encode(msg, &google_protobuf_EnumDescriptorProto_msginit, arena, len);
@ -1668,9 +1672,10 @@ UPB_INLINE bool google_protobuf_EnumDescriptorProto_add_reserved_name(google_pro
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_new(upb_arena *arena) { UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_new(upb_arena *arena) {
return (google_protobuf_EnumDescriptorProto_EnumReservedRange *)upb_msg_new(&google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena); return (google_protobuf_EnumDescriptorProto_EnumReservedRange *)upb_msg_new(&google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena);
} }
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_EnumDescriptorProto_EnumReservedRange *ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena); google_protobuf_EnumDescriptorProto_EnumReservedRange *ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena, len); return upb_encode(msg, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena, len);
@ -1696,9 +1701,10 @@ UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end(go
UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_new(upb_arena *arena) { UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_new(upb_arena *arena) {
return (google_protobuf_EnumValueDescriptorProto *)upb_msg_new(&google_protobuf_EnumValueDescriptorProto_msginit, arena); return (google_protobuf_EnumValueDescriptorProto *)upb_msg_new(&google_protobuf_EnumValueDescriptorProto_msginit, arena);
} }
UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_EnumValueDescriptorProto *ret = google_protobuf_EnumValueDescriptorProto_new(arena); google_protobuf_EnumValueDescriptorProto *ret = google_protobuf_EnumValueDescriptorProto_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_EnumValueDescriptorProto_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumValueDescriptorProto_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_EnumValueDescriptorProto_serialize(const google_protobuf_EnumValueDescriptorProto *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_EnumValueDescriptorProto_serialize(const google_protobuf_EnumValueDescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_EnumValueDescriptorProto_msginit, arena, len); return upb_encode(msg, &google_protobuf_EnumValueDescriptorProto_msginit, arena, len);
@ -1739,9 +1745,10 @@ UPB_INLINE struct google_protobuf_EnumValueOptions* google_protobuf_EnumValueDes
UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_new(upb_arena *arena) { UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_new(upb_arena *arena) {
return (google_protobuf_ServiceDescriptorProto *)upb_msg_new(&google_protobuf_ServiceDescriptorProto_msginit, arena); return (google_protobuf_ServiceDescriptorProto *)upb_msg_new(&google_protobuf_ServiceDescriptorProto_msginit, arena);
} }
UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_ServiceDescriptorProto *ret = google_protobuf_ServiceDescriptorProto_new(arena); google_protobuf_ServiceDescriptorProto *ret = google_protobuf_ServiceDescriptorProto_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_ServiceDescriptorProto_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_ServiceDescriptorProto_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_ServiceDescriptorProto_serialize(const google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_ServiceDescriptorProto_serialize(const google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_ServiceDescriptorProto_msginit, arena, len); return upb_encode(msg, &google_protobuf_ServiceDescriptorProto_msginit, arena, len);
@ -1790,9 +1797,10 @@ UPB_INLINE struct google_protobuf_ServiceOptions* google_protobuf_ServiceDescrip
UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_new(upb_arena *arena) { UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_new(upb_arena *arena) {
return (google_protobuf_MethodDescriptorProto *)upb_msg_new(&google_protobuf_MethodDescriptorProto_msginit, arena); return (google_protobuf_MethodDescriptorProto *)upb_msg_new(&google_protobuf_MethodDescriptorProto_msginit, arena);
} }
UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_MethodDescriptorProto *ret = google_protobuf_MethodDescriptorProto_new(arena); google_protobuf_MethodDescriptorProto *ret = google_protobuf_MethodDescriptorProto_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_MethodDescriptorProto_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_MethodDescriptorProto_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_MethodDescriptorProto_serialize(const google_protobuf_MethodDescriptorProto *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_MethodDescriptorProto_serialize(const google_protobuf_MethodDescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_MethodDescriptorProto_msginit, arena, len); return upb_encode(msg, &google_protobuf_MethodDescriptorProto_msginit, arena, len);
@ -1851,9 +1859,10 @@ UPB_INLINE void google_protobuf_MethodDescriptorProto_set_server_streaming(googl
UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_new(upb_arena *arena) { UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_new(upb_arena *arena) {
return (google_protobuf_FileOptions *)upb_msg_new(&google_protobuf_FileOptions_msginit, arena); return (google_protobuf_FileOptions *)upb_msg_new(&google_protobuf_FileOptions_msginit, arena);
} }
UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_FileOptions *ret = google_protobuf_FileOptions_new(arena); google_protobuf_FileOptions *ret = google_protobuf_FileOptions_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_FileOptions_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_FileOptions_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_FileOptions_serialize(const google_protobuf_FileOptions *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_FileOptions_serialize(const google_protobuf_FileOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_FileOptions_msginit, arena, len); return upb_encode(msg, &google_protobuf_FileOptions_msginit, arena, len);
@ -1864,7 +1873,7 @@ UPB_INLINE upb_strview google_protobuf_FileOptions_java_package(const google_pro
UPB_INLINE bool google_protobuf_FileOptions_has_java_outer_classname(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 12); } UPB_INLINE bool google_protobuf_FileOptions_has_java_outer_classname(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 12); }
UPB_INLINE upb_strview google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(36, 48)); } UPB_INLINE upb_strview google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(36, 48)); }
UPB_INLINE bool google_protobuf_FileOptions_has_optimize_for(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 1); } UPB_INLINE bool google_protobuf_FileOptions_has_optimize_for(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 1); }
UPB_INLINE google_protobuf_FileOptions_OptimizeMode google_protobuf_FileOptions_optimize_for(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, google_protobuf_FileOptions_OptimizeMode, UPB_SIZE(8, 8)); } UPB_INLINE int32_t google_protobuf_FileOptions_optimize_for(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); }
UPB_INLINE bool google_protobuf_FileOptions_has_java_multiple_files(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 2); } UPB_INLINE bool google_protobuf_FileOptions_has_java_multiple_files(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 2); }
UPB_INLINE bool google_protobuf_FileOptions_java_multiple_files(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)); } UPB_INLINE bool google_protobuf_FileOptions_java_multiple_files(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)); }
UPB_INLINE bool google_protobuf_FileOptions_has_go_package(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 13); } UPB_INLINE bool google_protobuf_FileOptions_has_go_package(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 13); }
@ -1905,9 +1914,9 @@ UPB_INLINE void google_protobuf_FileOptions_set_java_outer_classname(google_prot
_upb_sethas(msg, 12); _upb_sethas(msg, 12);
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(36, 48)) = value; UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(36, 48)) = value;
} }
UPB_INLINE void google_protobuf_FileOptions_set_optimize_for(google_protobuf_FileOptions *msg, google_protobuf_FileOptions_OptimizeMode value) { UPB_INLINE void google_protobuf_FileOptions_set_optimize_for(google_protobuf_FileOptions *msg, int32_t value) {
_upb_sethas(msg, 1); _upb_sethas(msg, 1);
UPB_FIELD_AT(msg, google_protobuf_FileOptions_OptimizeMode, UPB_SIZE(8, 8)) = value; UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value;
} }
UPB_INLINE void google_protobuf_FileOptions_set_java_multiple_files(google_protobuf_FileOptions *msg, bool value) { UPB_INLINE void google_protobuf_FileOptions_set_java_multiple_files(google_protobuf_FileOptions *msg, bool value) {
_upb_sethas(msg, 2); _upb_sethas(msg, 2);
@ -1989,9 +1998,10 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FileOptio
UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_new(upb_arena *arena) { UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_new(upb_arena *arena) {
return (google_protobuf_MessageOptions *)upb_msg_new(&google_protobuf_MessageOptions_msginit, arena); return (google_protobuf_MessageOptions *)upb_msg_new(&google_protobuf_MessageOptions_msginit, arena);
} }
UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_MessageOptions *ret = google_protobuf_MessageOptions_new(arena); google_protobuf_MessageOptions *ret = google_protobuf_MessageOptions_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_MessageOptions_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_MessageOptions_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_MessageOptions_serialize(const google_protobuf_MessageOptions *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_MessageOptions_serialize(const google_protobuf_MessageOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_MessageOptions_msginit, arena, len); return upb_encode(msg, &google_protobuf_MessageOptions_msginit, arena, len);
@ -2043,16 +2053,17 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MessageOp
UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_new(upb_arena *arena) { UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_new(upb_arena *arena) {
return (google_protobuf_FieldOptions *)upb_msg_new(&google_protobuf_FieldOptions_msginit, arena); return (google_protobuf_FieldOptions *)upb_msg_new(&google_protobuf_FieldOptions_msginit, arena);
} }
UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_FieldOptions *ret = google_protobuf_FieldOptions_new(arena); google_protobuf_FieldOptions *ret = google_protobuf_FieldOptions_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_FieldOptions_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_FieldOptions_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_FieldOptions_serialize(const google_protobuf_FieldOptions *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_FieldOptions_serialize(const google_protobuf_FieldOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_FieldOptions_msginit, arena, len); return upb_encode(msg, &google_protobuf_FieldOptions_msginit, arena, len);
} }
UPB_INLINE bool google_protobuf_FieldOptions_has_ctype(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 1); } UPB_INLINE bool google_protobuf_FieldOptions_has_ctype(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 1); }
UPB_INLINE google_protobuf_FieldOptions_CType google_protobuf_FieldOptions_ctype(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, google_protobuf_FieldOptions_CType, UPB_SIZE(8, 8)); } UPB_INLINE int32_t google_protobuf_FieldOptions_ctype(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); }
UPB_INLINE bool google_protobuf_FieldOptions_has_packed(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 3); } UPB_INLINE bool google_protobuf_FieldOptions_has_packed(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 3); }
UPB_INLINE bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)); } UPB_INLINE bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)); }
UPB_INLINE bool google_protobuf_FieldOptions_has_deprecated(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 4); } UPB_INLINE bool google_protobuf_FieldOptions_has_deprecated(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 4); }
@ -2060,14 +2071,14 @@ UPB_INLINE bool google_protobuf_FieldOptions_deprecated(const google_protobuf_Fi
UPB_INLINE bool google_protobuf_FieldOptions_has_lazy(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 5); } UPB_INLINE bool google_protobuf_FieldOptions_has_lazy(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 5); }
UPB_INLINE bool google_protobuf_FieldOptions_lazy(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(26, 26)); } UPB_INLINE bool google_protobuf_FieldOptions_lazy(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(26, 26)); }
UPB_INLINE bool google_protobuf_FieldOptions_has_jstype(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 2); } UPB_INLINE bool google_protobuf_FieldOptions_has_jstype(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 2); }
UPB_INLINE google_protobuf_FieldOptions_JSType google_protobuf_FieldOptions_jstype(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, google_protobuf_FieldOptions_JSType, UPB_SIZE(16, 16)); } UPB_INLINE int32_t google_protobuf_FieldOptions_jstype(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)); }
UPB_INLINE bool google_protobuf_FieldOptions_has_weak(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 6); } UPB_INLINE bool google_protobuf_FieldOptions_has_weak(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 6); }
UPB_INLINE bool google_protobuf_FieldOptions_weak(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(27, 27)); } UPB_INLINE bool google_protobuf_FieldOptions_weak(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(27, 27)); }
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FieldOptions_uninterpreted_option(const google_protobuf_FieldOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FieldOptions_uninterpreted_option(const google_protobuf_FieldOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); }
UPB_INLINE void google_protobuf_FieldOptions_set_ctype(google_protobuf_FieldOptions *msg, google_protobuf_FieldOptions_CType value) { UPB_INLINE void google_protobuf_FieldOptions_set_ctype(google_protobuf_FieldOptions *msg, int32_t value) {
_upb_sethas(msg, 1); _upb_sethas(msg, 1);
UPB_FIELD_AT(msg, google_protobuf_FieldOptions_CType, UPB_SIZE(8, 8)) = value; UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value;
} }
UPB_INLINE void google_protobuf_FieldOptions_set_packed(google_protobuf_FieldOptions *msg, bool value) { UPB_INLINE void google_protobuf_FieldOptions_set_packed(google_protobuf_FieldOptions *msg, bool value) {
_upb_sethas(msg, 3); _upb_sethas(msg, 3);
@ -2081,9 +2092,9 @@ UPB_INLINE void google_protobuf_FieldOptions_set_lazy(google_protobuf_FieldOptio
_upb_sethas(msg, 5); _upb_sethas(msg, 5);
UPB_FIELD_AT(msg, bool, UPB_SIZE(26, 26)) = value; UPB_FIELD_AT(msg, bool, UPB_SIZE(26, 26)) = value;
} }
UPB_INLINE void google_protobuf_FieldOptions_set_jstype(google_protobuf_FieldOptions *msg, google_protobuf_FieldOptions_JSType value) { UPB_INLINE void google_protobuf_FieldOptions_set_jstype(google_protobuf_FieldOptions *msg, int32_t value) {
_upb_sethas(msg, 2); _upb_sethas(msg, 2);
UPB_FIELD_AT(msg, google_protobuf_FieldOptions_JSType, UPB_SIZE(16, 16)) = value; UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)) = value;
} }
UPB_INLINE void google_protobuf_FieldOptions_set_weak(google_protobuf_FieldOptions *msg, bool value) { UPB_INLINE void google_protobuf_FieldOptions_set_weak(google_protobuf_FieldOptions *msg, bool value) {
_upb_sethas(msg, 6); _upb_sethas(msg, 6);
@ -2109,9 +2120,10 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FieldOpti
UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_new(upb_arena *arena) { UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_new(upb_arena *arena) {
return (google_protobuf_OneofOptions *)upb_msg_new(&google_protobuf_OneofOptions_msginit, arena); return (google_protobuf_OneofOptions *)upb_msg_new(&google_protobuf_OneofOptions_msginit, arena);
} }
UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_OneofOptions *ret = google_protobuf_OneofOptions_new(arena); google_protobuf_OneofOptions *ret = google_protobuf_OneofOptions_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_OneofOptions_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_OneofOptions_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_OneofOptions_serialize(const google_protobuf_OneofOptions *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_OneofOptions_serialize(const google_protobuf_OneofOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_OneofOptions_msginit, arena, len); return upb_encode(msg, &google_protobuf_OneofOptions_msginit, arena, len);
@ -2139,9 +2151,10 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_OneofOpti
UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_new(upb_arena *arena) { UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_new(upb_arena *arena) {
return (google_protobuf_EnumOptions *)upb_msg_new(&google_protobuf_EnumOptions_msginit, arena); return (google_protobuf_EnumOptions *)upb_msg_new(&google_protobuf_EnumOptions_msginit, arena);
} }
UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_EnumOptions *ret = google_protobuf_EnumOptions_new(arena); google_protobuf_EnumOptions *ret = google_protobuf_EnumOptions_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_EnumOptions_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumOptions_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_EnumOptions_serialize(const google_protobuf_EnumOptions *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_EnumOptions_serialize(const google_protobuf_EnumOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_EnumOptions_msginit, arena, len); return upb_encode(msg, &google_protobuf_EnumOptions_msginit, arena, len);
@ -2181,9 +2194,10 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumOptio
UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_new(upb_arena *arena) { UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_new(upb_arena *arena) {
return (google_protobuf_EnumValueOptions *)upb_msg_new(&google_protobuf_EnumValueOptions_msginit, arena); return (google_protobuf_EnumValueOptions *)upb_msg_new(&google_protobuf_EnumValueOptions_msginit, arena);
} }
UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_EnumValueOptions *ret = google_protobuf_EnumValueOptions_new(arena); google_protobuf_EnumValueOptions *ret = google_protobuf_EnumValueOptions_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_EnumValueOptions_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumValueOptions_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_EnumValueOptions_serialize(const google_protobuf_EnumValueOptions *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_EnumValueOptions_serialize(const google_protobuf_EnumValueOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_EnumValueOptions_msginit, arena, len); return upb_encode(msg, &google_protobuf_EnumValueOptions_msginit, arena, len);
@ -2217,9 +2231,10 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumValue
UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_new(upb_arena *arena) { UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_new(upb_arena *arena) {
return (google_protobuf_ServiceOptions *)upb_msg_new(&google_protobuf_ServiceOptions_msginit, arena); return (google_protobuf_ServiceOptions *)upb_msg_new(&google_protobuf_ServiceOptions_msginit, arena);
} }
UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_ServiceOptions *ret = google_protobuf_ServiceOptions_new(arena); google_protobuf_ServiceOptions *ret = google_protobuf_ServiceOptions_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_ServiceOptions_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_ServiceOptions_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_ServiceOptions_serialize(const google_protobuf_ServiceOptions *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_ServiceOptions_serialize(const google_protobuf_ServiceOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_ServiceOptions_msginit, arena, len); return upb_encode(msg, &google_protobuf_ServiceOptions_msginit, arena, len);
@ -2253,9 +2268,10 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ServiceOp
UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_new(upb_arena *arena) { UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_new(upb_arena *arena) {
return (google_protobuf_MethodOptions *)upb_msg_new(&google_protobuf_MethodOptions_msginit, arena); return (google_protobuf_MethodOptions *)upb_msg_new(&google_protobuf_MethodOptions_msginit, arena);
} }
UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_MethodOptions *ret = google_protobuf_MethodOptions_new(arena); google_protobuf_MethodOptions *ret = google_protobuf_MethodOptions_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_MethodOptions_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_MethodOptions_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_MethodOptions_serialize(const google_protobuf_MethodOptions *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_MethodOptions_serialize(const google_protobuf_MethodOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_MethodOptions_msginit, arena, len); return upb_encode(msg, &google_protobuf_MethodOptions_msginit, arena, len);
@ -2264,16 +2280,16 @@ UPB_INLINE char *google_protobuf_MethodOptions_serialize(const google_protobuf_M
UPB_INLINE bool google_protobuf_MethodOptions_has_deprecated(const google_protobuf_MethodOptions *msg) { return _upb_has_field(msg, 2); } UPB_INLINE bool google_protobuf_MethodOptions_has_deprecated(const google_protobuf_MethodOptions *msg) { return _upb_has_field(msg, 2); }
UPB_INLINE bool google_protobuf_MethodOptions_deprecated(const google_protobuf_MethodOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)); } UPB_INLINE bool google_protobuf_MethodOptions_deprecated(const google_protobuf_MethodOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)); }
UPB_INLINE bool google_protobuf_MethodOptions_has_idempotency_level(const google_protobuf_MethodOptions *msg) { return _upb_has_field(msg, 1); } UPB_INLINE bool google_protobuf_MethodOptions_has_idempotency_level(const google_protobuf_MethodOptions *msg) { return _upb_has_field(msg, 1); }
UPB_INLINE google_protobuf_MethodOptions_IdempotencyLevel google_protobuf_MethodOptions_idempotency_level(const google_protobuf_MethodOptions *msg) { return UPB_FIELD_AT(msg, google_protobuf_MethodOptions_IdempotencyLevel, UPB_SIZE(8, 8)); } UPB_INLINE int32_t google_protobuf_MethodOptions_idempotency_level(const google_protobuf_MethodOptions *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); }
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MethodOptions_uninterpreted_option(const google_protobuf_MethodOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(20, 24), len); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MethodOptions_uninterpreted_option(const google_protobuf_MethodOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(20, 24), len); }
UPB_INLINE void google_protobuf_MethodOptions_set_deprecated(google_protobuf_MethodOptions *msg, bool value) { UPB_INLINE void google_protobuf_MethodOptions_set_deprecated(google_protobuf_MethodOptions *msg, bool value) {
_upb_sethas(msg, 2); _upb_sethas(msg, 2);
UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)) = value; UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)) = value;
} }
UPB_INLINE void google_protobuf_MethodOptions_set_idempotency_level(google_protobuf_MethodOptions *msg, google_protobuf_MethodOptions_IdempotencyLevel value) { UPB_INLINE void google_protobuf_MethodOptions_set_idempotency_level(google_protobuf_MethodOptions *msg, int32_t value) {
_upb_sethas(msg, 1); _upb_sethas(msg, 1);
UPB_FIELD_AT(msg, google_protobuf_MethodOptions_IdempotencyLevel, UPB_SIZE(8, 8)) = value; UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value;
} }
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_mutable_uninterpreted_option(google_protobuf_MethodOptions *msg, size_t *len) { UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_mutable_uninterpreted_option(google_protobuf_MethodOptions *msg, size_t *len) {
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 24), len); return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 24), len);
@ -2295,9 +2311,10 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MethodOpt
UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_new(upb_arena *arena) { UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_new(upb_arena *arena) {
return (google_protobuf_UninterpretedOption *)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); return (google_protobuf_UninterpretedOption *)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
} }
UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_UninterpretedOption *ret = google_protobuf_UninterpretedOption_new(arena); google_protobuf_UninterpretedOption *ret = google_protobuf_UninterpretedOption_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_UninterpretedOption_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_UninterpretedOption_serialize(const google_protobuf_UninterpretedOption *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_UninterpretedOption_serialize(const google_protobuf_UninterpretedOption *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_UninterpretedOption_msginit, arena, len); return upb_encode(msg, &google_protobuf_UninterpretedOption_msginit, arena, len);
@ -2361,9 +2378,10 @@ UPB_INLINE void google_protobuf_UninterpretedOption_set_aggregate_value(google_p
UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_new(upb_arena *arena) { UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_new(upb_arena *arena) {
return (google_protobuf_UninterpretedOption_NamePart *)upb_msg_new(&google_protobuf_UninterpretedOption_NamePart_msginit, arena); return (google_protobuf_UninterpretedOption_NamePart *)upb_msg_new(&google_protobuf_UninterpretedOption_NamePart_msginit, arena);
} }
UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_UninterpretedOption_NamePart *ret = google_protobuf_UninterpretedOption_NamePart_new(arena); google_protobuf_UninterpretedOption_NamePart *ret = google_protobuf_UninterpretedOption_NamePart_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_UninterpretedOption_NamePart_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_NamePart_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_UninterpretedOption_NamePart_serialize(const google_protobuf_UninterpretedOption_NamePart *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_UninterpretedOption_NamePart_serialize(const google_protobuf_UninterpretedOption_NamePart *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_UninterpretedOption_NamePart_msginit, arena, len); return upb_encode(msg, &google_protobuf_UninterpretedOption_NamePart_msginit, arena, len);
@ -2389,9 +2407,10 @@ UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_is_extension(go
UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_new(upb_arena *arena) { UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_new(upb_arena *arena) {
return (google_protobuf_SourceCodeInfo *)upb_msg_new(&google_protobuf_SourceCodeInfo_msginit, arena); return (google_protobuf_SourceCodeInfo *)upb_msg_new(&google_protobuf_SourceCodeInfo_msginit, arena);
} }
UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_SourceCodeInfo *ret = google_protobuf_SourceCodeInfo_new(arena); google_protobuf_SourceCodeInfo *ret = google_protobuf_SourceCodeInfo_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_SourceCodeInfo_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_SourceCodeInfo_serialize(const google_protobuf_SourceCodeInfo *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_SourceCodeInfo_serialize(const google_protobuf_SourceCodeInfo *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_SourceCodeInfo_msginit, arena, len); return upb_encode(msg, &google_protobuf_SourceCodeInfo_msginit, arena, len);
@ -2419,9 +2438,10 @@ UPB_INLINE struct google_protobuf_SourceCodeInfo_Location* google_protobuf_Sourc
UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_new(upb_arena *arena) { UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_new(upb_arena *arena) {
return (google_protobuf_SourceCodeInfo_Location *)upb_msg_new(&google_protobuf_SourceCodeInfo_Location_msginit, arena); return (google_protobuf_SourceCodeInfo_Location *)upb_msg_new(&google_protobuf_SourceCodeInfo_Location_msginit, arena);
} }
UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_SourceCodeInfo_Location *ret = google_protobuf_SourceCodeInfo_Location_new(arena); google_protobuf_SourceCodeInfo_Location *ret = google_protobuf_SourceCodeInfo_Location_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_SourceCodeInfo_Location_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_Location_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_SourceCodeInfo_Location_serialize(const google_protobuf_SourceCodeInfo_Location *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_SourceCodeInfo_Location_serialize(const google_protobuf_SourceCodeInfo_Location *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_SourceCodeInfo_Location_msginit, arena, len); return upb_encode(msg, &google_protobuf_SourceCodeInfo_Location_msginit, arena, len);
@ -2480,9 +2500,10 @@ UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_leading_detached_com
UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_new(upb_arena *arena) { UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_new(upb_arena *arena) {
return (google_protobuf_GeneratedCodeInfo *)upb_msg_new(&google_protobuf_GeneratedCodeInfo_msginit, arena); return (google_protobuf_GeneratedCodeInfo *)upb_msg_new(&google_protobuf_GeneratedCodeInfo_msginit, arena);
} }
UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_GeneratedCodeInfo *ret = google_protobuf_GeneratedCodeInfo_new(arena); google_protobuf_GeneratedCodeInfo *ret = google_protobuf_GeneratedCodeInfo_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_GeneratedCodeInfo_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_GeneratedCodeInfo_serialize(const google_protobuf_GeneratedCodeInfo *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_GeneratedCodeInfo_serialize(const google_protobuf_GeneratedCodeInfo *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_msginit, arena, len); return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_msginit, arena, len);
@ -2510,9 +2531,10 @@ UPB_INLINE struct google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_new(upb_arena *arena) { UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_new(upb_arena *arena) {
return (google_protobuf_GeneratedCodeInfo_Annotation *)upb_msg_new(&google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena); return (google_protobuf_GeneratedCodeInfo_Annotation *)upb_msg_new(&google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena);
} }
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_parsenew(upb_strview buf, upb_arena *arena) { UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_GeneratedCodeInfo_Annotation *ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena); google_protobuf_GeneratedCodeInfo_Annotation *ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_GeneratedCodeInfo_Annotation_msginit)) ? ret : NULL; return (ret && upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_Annotation_msginit)) ? ret : NULL;
} }
UPB_INLINE char *google_protobuf_GeneratedCodeInfo_Annotation_serialize(const google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_arena *arena, size_t *len) { UPB_INLINE char *google_protobuf_GeneratedCodeInfo_Annotation_serialize(const google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena, len); return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena, len);
@ -6729,6 +6751,18 @@ extern "C" {
* descriptor type (upb_descriptortype_t). */ * descriptor type (upb_descriptortype_t). */
extern const uint8_t upb_pb_native_wire_types[]; extern const uint8_t upb_pb_native_wire_types[];
UPB_INLINE uint64_t byteswap64(uint64_t val)
{
return ((((val) & 0xff00000000000000ull) >> 56)
| (((val) & 0x00ff000000000000ull) >> 40)
| (((val) & 0x0000ff0000000000ull) >> 24)
| (((val) & 0x000000ff00000000ull) >> 8)
| (((val) & 0x00000000ff000000ull) << 8)
| (((val) & 0x0000000000ff0000ull) << 24)
| (((val) & 0x000000000000ff00ull) << 40)
| (((val) & 0x00000000000000ffull) << 56));
}
/* Zig-zag encoding/decoding **************************************************/ /* Zig-zag encoding/decoding **************************************************/
UPB_INLINE int32_t upb_zzdec_32(uint32_t n) { UPB_INLINE int32_t upb_zzdec_32(uint32_t n) {
@ -6835,6 +6869,9 @@ UPB_INLINE uint64_t upb_vencode32(uint32_t val) {
uint64_t ret = 0; uint64_t ret = 0;
UPB_ASSERT(bytes <= 5); UPB_ASSERT(bytes <= 5);
memcpy(&ret, buf, bytes); memcpy(&ret, buf, bytes);
#ifdef UPB_BIG_ENDIAN
ret = byteswap64(ret);
#endif
UPB_ASSERT(ret <= 0xffffffffffU); UPB_ASSERT(ret <= 0xffffffffffU);
return ret; return ret;
} }

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Describes a message type. * Describes a message type.

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Generated from protobuf message <code>google.protobuf.DescriptorProto.ExtensionRange</code> * Generated from protobuf message <code>google.protobuf.DescriptorProto.ExtensionRange</code>

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Range of reserved tag numbers. Reserved tag numbers may not be used by * Range of reserved tag numbers. Reserved tag numbers may not be used by

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Describes an enum type. * Describes an enum type.

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Range of reserved numeric values. Reserved values may not be used by * Range of reserved numeric values. Reserved values may not be used by

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Generated from protobuf message <code>google.protobuf.EnumOptions</code> * Generated from protobuf message <code>google.protobuf.EnumOptions</code>

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Describes a value within an enum. * Describes a value within an enum.

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Generated from protobuf message <code>google.protobuf.EnumValueOptions</code> * Generated from protobuf message <code>google.protobuf.EnumValueOptions</code>

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Generated from protobuf message <code>google.protobuf.ExtensionRangeOptions</code> * Generated from protobuf message <code>google.protobuf.ExtensionRangeOptions</code>

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Describes a field within a message. * Describes a field within a message.

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Generated from protobuf message <code>google.protobuf.FieldOptions</code> * Generated from protobuf message <code>google.protobuf.FieldOptions</code>

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Describes a complete .proto file. * Describes a complete .proto file.

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* The protocol compiler can output a FileDescriptorSet containing the .proto * The protocol compiler can output a FileDescriptorSet containing the .proto

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Generated from protobuf message <code>google.protobuf.FileOptions</code> * Generated from protobuf message <code>google.protobuf.FileOptions</code>

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Describes the relationship between generated code and its original source * Describes the relationship between generated code and its original source

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Generated from protobuf message <code>google.protobuf.GeneratedCodeInfo.Annotation</code> * Generated from protobuf message <code>google.protobuf.GeneratedCodeInfo.Annotation</code>

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Generated from protobuf message <code>google.protobuf.MessageOptions</code> * Generated from protobuf message <code>google.protobuf.MessageOptions</code>

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Describes a method of a service. * Describes a method of a service.

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Generated from protobuf message <code>google.protobuf.MethodOptions</code> * Generated from protobuf message <code>google.protobuf.MethodOptions</code>

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Describes a oneof. * Describes a oneof.

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Generated from protobuf message <code>google.protobuf.OneofOptions</code> * Generated from protobuf message <code>google.protobuf.OneofOptions</code>

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Describes a service. * Describes a service.

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Generated from protobuf message <code>google.protobuf.ServiceOptions</code> * Generated from protobuf message <code>google.protobuf.ServiceOptions</code>

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Encapsulates information about the original source file from which a * Encapsulates information about the original source file from which a

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* Generated from protobuf message <code>google.protobuf.SourceCodeInfo.Location</code> * Generated from protobuf message <code>google.protobuf.SourceCodeInfo.Location</code>

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* A message representing a option the parser does not recognize. This only * A message representing a option the parser does not recognize. This only

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/** /**
* The name of the uninterpreted option. Each string represents a segment in * The name of the uninterpreted option. Each string represents a segment in

@ -167,6 +167,23 @@ class EncodeDecodeTest extends TestBase
$this->assertSame("\"YQ==\"", $m->serializeToJsonString()); $this->assertSame("\"YQ==\"", $m->serializeToJsonString());
} }
public function generateRandomString($length = 10) {
$randomString = str_repeat("+", $length);
for ($i = 0; $i < $length; $i++) {
$randomString[$i] = rand(0, 255);
}
return $randomString;
}
public function testEncodeTopLevelLongBytesValue()
{
$m = new BytesValue();
$data = $this->generateRandomString(12007);
$m->setValue($data);
$expected = "\"" . base64_encode($data) . "\"";
$this->assertSame(strlen($expected), strlen($m->serializeToJsonString()));
}
public function testEncode() public function testEncode()
{ {
$from = new TestMessage(); $from = new TestMessage();

@ -1,6 +1,7 @@
syntax = "proto3"; syntax = "proto3";
import 'google/protobuf/any.proto'; import 'google/protobuf/any.proto';
import 'google/protobuf/struct.proto';
import 'proto/test_include.proto'; import 'proto/test_include.proto';
import 'proto/test_no_namespace.proto'; import 'proto/test_no_namespace.proto';
import 'proto/test_php_namespace.proto'; import 'proto/test_php_namespace.proto';

@ -140,9 +140,9 @@ checkDependencies ()
host_machine="$(uname -m)"; host_machine="$(uname -m)";
dump_cmd='ldd '"$1" dump_cmd='ldd '"$1"
if [[ "$ARCH" == x86_32 ]]; then if [[ "$ARCH" == x86_32 ]]; then
white_list="linux-gate\.so\.1\|libpthread\.so\.0\|libm\.so\.6\|libc\.so\.6\|ld-linux\.so\.2\|libatomic\.so\.1" white_list="linux-gate\.so\.1\|libpthread\.so\.0\|libm\.so\.6\|libc\.so\.6\|ld-linux\.so\.2"
elif [[ "$ARCH" == x86_64 ]]; then elif [[ "$ARCH" == x86_64 ]]; then
white_list="linux-vdso\.so\.1\|libpthread\.so\.0\|libm\.so\.6\|libc\.so\.6\|ld-linux-x86-64\.so\.2\|libatomic\.so\.1" white_list="linux-vdso\.so\.1\|libpthread\.so\.0\|libm\.so\.6\|libc\.so\.6\|ld-linux-x86-64\.so\.2"
elif [[ "$ARCH" == ppcle_64 ]]; then elif [[ "$ARCH" == ppcle_64 ]]; then
if [[ $host_machine != ppc64le ]];then if [[ $host_machine != ppc64le ]];then
dump_cmd='objdump -p '"$1"' | grep NEEDED' dump_cmd='objdump -p '"$1"' | grep NEEDED'

@ -8,7 +8,7 @@
</parent> </parent>
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protoc</artifactId> <artifactId>protoc</artifactId>
<version>3.7.0</version> <version>3.7.1</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Protobuf Compiler</name> <name>Protobuf Compiler</name>
<description> <description>

@ -30,7 +30,7 @@
# Copyright 2007 Google Inc. All Rights Reserved. # Copyright 2007 Google Inc. All Rights Reserved.
__version__ = '3.7.0' __version__ = '3.7.1'
if __name__ != '__main__': if __name__ != '__main__':
try: try:

@ -1237,6 +1237,34 @@ static void putjsonany(VALUE msg_rb, const Descriptor* desc,
upb_sink_endmsg(sink, &status); upb_sink_endmsg(sink, &status);
} }
static void putjsonlistvalue(
VALUE msg_rb, const Descriptor* desc,
upb_sink* sink, int depth, bool emit_defaults) {
upb_status status;
upb_sink subsink;
MessageHeader* msg = NULL;
const upb_fielddef* f = upb_msgdef_itof(desc->msgdef, 1);
uint32_t offset =
desc->layout->fields[upb_fielddef_index(f)].offset +
sizeof(MessageHeader);
VALUE ary;
TypedData_Get_Struct(msg_rb, MessageHeader, &Message_type, msg);
upb_sink_startmsg(sink);
ary = DEREF(msg, offset, VALUE);
if (ary == Qnil || RepeatedField_size(ary) == 0) {
upb_sink_startseq(sink, getsel(f, UPB_HANDLER_STARTSEQ), &subsink);
upb_sink_endseq(sink, getsel(f, UPB_HANDLER_ENDSEQ));
} else {
putary(ary, f, sink, depth, emit_defaults, true);
}
upb_sink_endmsg(sink, &status);
}
static void putmsg(VALUE msg_rb, const Descriptor* desc, static void putmsg(VALUE msg_rb, const Descriptor* desc,
upb_sink *sink, int depth, bool emit_defaults, upb_sink *sink, int depth, bool emit_defaults,
bool is_json, bool open_msg) { bool is_json, bool open_msg) {
@ -1244,11 +1272,18 @@ static void putmsg(VALUE msg_rb, const Descriptor* desc,
upb_msg_field_iter i; upb_msg_field_iter i;
upb_status status; upb_status status;
if (is_json && upb_msgdef_wellknowntype(desc->msgdef) == UPB_WELLKNOWN_ANY) { if (is_json &&
upb_msgdef_wellknowntype(desc->msgdef) == UPB_WELLKNOWN_ANY) {
putjsonany(msg_rb, desc, sink, depth, emit_defaults); putjsonany(msg_rb, desc, sink, depth, emit_defaults);
return; return;
} }
if (is_json &&
upb_msgdef_wellknowntype(desc->msgdef) == UPB_WELLKNOWN_LISTVALUE) {
putjsonlistvalue(msg_rb, desc, sink, depth, emit_defaults);
return;
}
if (open_msg) { if (open_msg) {
upb_sink_startmsg(sink); upb_sink_startmsg(sink);
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,6 +1,6 @@
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.name = "google-protobuf" s.name = "google-protobuf"
s.version = "3.7.0" s.version = "3.7.1"
s.licenses = ["BSD-3-Clause"] s.licenses = ["BSD-3-Clause"]
s.summary = "Protocol Buffers" s.summary = "Protocol Buffers"
s.description = "Protocol Buffers are Google's data interchange format." s.description = "Protocol Buffers are Google's data interchange format."

@ -36,8 +36,11 @@ test_version() {
cd ../ruby/compatibility_tests/v3.0.0 && cd ../ruby/compatibility_tests/v3.0.0 &&
cp -R ../../lib lib && ./test.sh" cp -R ../../lib lib && ./test.sh"
else else
# Recent versions of OSX have deprecated OpenSSL, so we have to explicitly
# provide a path to the OpenSSL directory installed via Homebrew.
bash --login -c \ bash --login -c \
"rvm install $version && rvm use $version && \ "rvm install $version --with-openssl-dir=`brew --prefix openssl` && \
rvm use $version && \
which ruby && \ which ruby && \
git clean -f && \ git clean -f && \
gem install bundler -v 1.17.3 && bundle && \ gem install bundler -v 1.17.3 && bundle && \

@ -18,7 +18,7 @@ else
PTHREAD_DEF = PTHREAD_DEF =
endif endif
PROTOBUF_VERSION = 18:0:0 PROTOBUF_VERSION = 18:1:0
if GCC if GCC
# Turn on all warnings except for sign comparison (we ignore sign comparison # Turn on all warnings except for sign comparison (we ignore sign comparison
@ -894,7 +894,7 @@ no_warning_test.cc:
no_warning_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la no_warning_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la
no_warning_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_DEF) $(ZLIB_DEF) \ no_warning_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_DEF) $(ZLIB_DEF) \
-Wall -Wextra -Werror -Wno-unused-parameter -Og -Wall -Wextra -Werror -Wno-unused-parameter
nodist_no_warning_test_SOURCES = no_warning_test.cc $(protoc_outputs) nodist_no_warning_test_SOURCES = no_warning_test.cc $(protoc_outputs)
TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \ TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update #error incompatible with your Protocol Buffer headers. Please update
#error your headers. #error your headers.
#endif #endif
#if 3007000 < PROTOBUF_MIN_PROTOC_VERSION #if 3007001 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc.
@ -66,7 +66,7 @@ PROTOBUF_NAMESPACE_OPEN
// =================================================================== // ===================================================================
class PROTOBUF_EXPORT Any final : class PROTOBUF_EXPORT Any :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Any) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Any) */ {
public: public:
Any(); Any();

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update #error incompatible with your Protocol Buffer headers. Please update
#error your headers. #error your headers.
#endif #endif
#if 3007000 < PROTOBUF_MIN_PROTOC_VERSION #if 3007001 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc.
@ -75,7 +75,7 @@ PROTOBUF_NAMESPACE_OPEN
// =================================================================== // ===================================================================
class PROTOBUF_EXPORT Api final : class PROTOBUF_EXPORT Api :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Api) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Api) */ {
public: public:
Api(); Api();
@ -263,7 +263,7 @@ class PROTOBUF_EXPORT Api final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT Method final : class PROTOBUF_EXPORT Method :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Method) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Method) */ {
public: public:
Method(); Method();
@ -442,7 +442,7 @@ class PROTOBUF_EXPORT Method final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT Mixin final : class PROTOBUF_EXPORT Mixin :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Mixin) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Mixin) */ {
public: public:
Mixin(); Mixin();

@ -247,7 +247,7 @@ bool HasPrivateHasMethod(const FieldDescriptor* field) {
bool ShouldMarkClassAsFinal(const Descriptor* descriptor, bool ShouldMarkClassAsFinal(const Descriptor* descriptor,
const Options& options) { const Options& options) {
return true; return false;
} }
bool ShouldMarkClearAsFinal(const Descriptor* descriptor, bool ShouldMarkClearAsFinal(const Descriptor* descriptor,

@ -1023,16 +1023,14 @@ void GenerateUseDeclaration(bool is_descriptor, io::Printer* printer) {
printer->Print( printer->Print(
"use Google\\Protobuf\\Internal\\GPBType;\n" "use Google\\Protobuf\\Internal\\GPBType;\n"
"use Google\\Protobuf\\Internal\\RepeatedField;\n" "use Google\\Protobuf\\Internal\\RepeatedField;\n"
"use Google\\Protobuf\\Internal\\GPBUtil;\n" "use Google\\Protobuf\\Internal\\GPBUtil;\n\n");
"use Google\\Protobuf\\Internal\\GPBWrapperUtils;\n\n");
} else { } else {
printer->Print( printer->Print(
"use Google\\Protobuf\\Internal\\GPBType;\n" "use Google\\Protobuf\\Internal\\GPBType;\n"
"use Google\\Protobuf\\Internal\\GPBWire;\n" "use Google\\Protobuf\\Internal\\GPBWire;\n"
"use Google\\Protobuf\\Internal\\RepeatedField;\n" "use Google\\Protobuf\\Internal\\RepeatedField;\n"
"use Google\\Protobuf\\Internal\\InputStream;\n" "use Google\\Protobuf\\Internal\\InputStream;\n"
"use Google\\Protobuf\\Internal\\GPBUtil;\n" "use Google\\Protobuf\\Internal\\GPBUtil;\n\n");
"use Google\\Protobuf\\Internal\\GPBWrapperUtils;\n\n");
} }
} }

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update #error incompatible with your Protocol Buffer headers. Please update
#error your headers. #error your headers.
#endif #endif
#if 3007000 < PROTOBUF_MIN_PROTOC_VERSION #if 3007001 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc.
@ -87,7 +87,7 @@ namespace compiler {
// =================================================================== // ===================================================================
class PROTOC_EXPORT Version final : class PROTOC_EXPORT Version :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.Version) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.Version) */ {
public: public:
Version(); Version();
@ -239,7 +239,7 @@ class PROTOC_EXPORT Version final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOC_EXPORT CodeGeneratorRequest final : class PROTOC_EXPORT CodeGeneratorRequest :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.CodeGeneratorRequest) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.CodeGeneratorRequest) */ {
public: public:
CodeGeneratorRequest(); CodeGeneratorRequest();
@ -409,7 +409,7 @@ class PROTOC_EXPORT CodeGeneratorRequest final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOC_EXPORT CodeGeneratorResponse_File final : class PROTOC_EXPORT CodeGeneratorResponse_File :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.CodeGeneratorResponse.File) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.CodeGeneratorResponse.File) */ {
public: public:
CodeGeneratorResponse_File(); CodeGeneratorResponse_File();
@ -565,7 +565,7 @@ class PROTOC_EXPORT CodeGeneratorResponse_File final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOC_EXPORT CodeGeneratorResponse final : class PROTOC_EXPORT CodeGeneratorResponse :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.CodeGeneratorResponse) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.CodeGeneratorResponse) */ {
public: public:
CodeGeneratorResponse(); CodeGeneratorResponse();

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update #error incompatible with your Protocol Buffer headers. Please update
#error your headers. #error your headers.
#endif #endif
#if 3007000 < PROTOBUF_MIN_PROTOC_VERSION #if 3007001 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc.
@ -305,7 +305,7 @@ inline bool MethodOptions_IdempotencyLevel_Parse(
} }
// =================================================================== // ===================================================================
class PROTOBUF_EXPORT FileDescriptorSet final : class PROTOBUF_EXPORT FileDescriptorSet :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FileDescriptorSet) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FileDescriptorSet) */ {
public: public:
FileDescriptorSet(); FileDescriptorSet();
@ -447,7 +447,7 @@ class PROTOBUF_EXPORT FileDescriptorSet final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT FileDescriptorProto final : class PROTOBUF_EXPORT FileDescriptorProto :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FileDescriptorProto) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FileDescriptorProto) */ {
public: public:
FileDescriptorProto(); FileDescriptorProto();
@ -768,7 +768,7 @@ class PROTOBUF_EXPORT FileDescriptorProto final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final : class PROTOBUF_EXPORT DescriptorProto_ExtensionRange :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.DescriptorProto.ExtensionRange) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.DescriptorProto.ExtensionRange) */ {
public: public:
DescriptorProto_ExtensionRange(); DescriptorProto_ExtensionRange();
@ -926,7 +926,7 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT DescriptorProto_ReservedRange final : class PROTOBUF_EXPORT DescriptorProto_ReservedRange :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.DescriptorProto.ReservedRange) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.DescriptorProto.ReservedRange) */ {
public: public:
DescriptorProto_ReservedRange(); DescriptorProto_ReservedRange();
@ -1071,7 +1071,7 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT DescriptorProto final : class PROTOBUF_EXPORT DescriptorProto :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.DescriptorProto) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.DescriptorProto) */ {
public: public:
DescriptorProto(); DescriptorProto();
@ -1349,7 +1349,7 @@ class PROTOBUF_EXPORT DescriptorProto final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT ExtensionRangeOptions final : class PROTOBUF_EXPORT ExtensionRangeOptions :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ExtensionRangeOptions) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ExtensionRangeOptions) */ {
public: public:
ExtensionRangeOptions(); ExtensionRangeOptions();
@ -1494,7 +1494,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT FieldDescriptorProto final : class PROTOBUF_EXPORT FieldDescriptorProto :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FieldDescriptorProto) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FieldDescriptorProto) */ {
public: public:
FieldDescriptorProto(); FieldDescriptorProto();
@ -1869,7 +1869,7 @@ class PROTOBUF_EXPORT FieldDescriptorProto final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT OneofDescriptorProto final : class PROTOBUF_EXPORT OneofDescriptorProto :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.OneofDescriptorProto) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.OneofDescriptorProto) */ {
public: public:
OneofDescriptorProto(); OneofDescriptorProto();
@ -2034,7 +2034,7 @@ class PROTOBUF_EXPORT OneofDescriptorProto final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final : class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumDescriptorProto.EnumReservedRange) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumDescriptorProto.EnumReservedRange) */ {
public: public:
EnumDescriptorProto_EnumReservedRange(); EnumDescriptorProto_EnumReservedRange();
@ -2179,7 +2179,7 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT EnumDescriptorProto final : class PROTOBUF_EXPORT EnumDescriptorProto :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumDescriptorProto) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumDescriptorProto) */ {
public: public:
EnumDescriptorProto(); EnumDescriptorProto();
@ -2391,7 +2391,7 @@ class PROTOBUF_EXPORT EnumDescriptorProto final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT EnumValueDescriptorProto final : class PROTOBUF_EXPORT EnumValueDescriptorProto :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumValueDescriptorProto) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumValueDescriptorProto) */ {
public: public:
EnumValueDescriptorProto(); EnumValueDescriptorProto();
@ -2564,7 +2564,7 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT ServiceDescriptorProto final : class PROTOBUF_EXPORT ServiceDescriptorProto :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ServiceDescriptorProto) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ServiceDescriptorProto) */ {
public: public:
ServiceDescriptorProto(); ServiceDescriptorProto();
@ -2742,7 +2742,7 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT MethodDescriptorProto final : class PROTOBUF_EXPORT MethodDescriptorProto :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.MethodDescriptorProto) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.MethodDescriptorProto) */ {
public: public:
MethodDescriptorProto(); MethodDescriptorProto();
@ -2969,7 +2969,7 @@ class PROTOBUF_EXPORT MethodDescriptorProto final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT FileOptions final : class PROTOBUF_EXPORT FileOptions :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FileOptions) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FileOptions) */ {
public: public:
FileOptions(); FileOptions();
@ -3452,7 +3452,7 @@ class PROTOBUF_EXPORT FileOptions final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT MessageOptions final : class PROTOBUF_EXPORT MessageOptions :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.MessageOptions) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.MessageOptions) */ {
public: public:
MessageOptions(); MessageOptions();
@ -3629,7 +3629,7 @@ class PROTOBUF_EXPORT MessageOptions final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT FieldOptions final : class PROTOBUF_EXPORT FieldOptions :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FieldOptions) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FieldOptions) */ {
public: public:
FieldOptions(); FieldOptions();
@ -3878,7 +3878,7 @@ class PROTOBUF_EXPORT FieldOptions final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT OneofOptions final : class PROTOBUF_EXPORT OneofOptions :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.OneofOptions) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.OneofOptions) */ {
public: public:
OneofOptions(); OneofOptions();
@ -4023,7 +4023,7 @@ class PROTOBUF_EXPORT OneofOptions final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT EnumOptions final : class PROTOBUF_EXPORT EnumOptions :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumOptions) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumOptions) */ {
public: public:
EnumOptions(); EnumOptions();
@ -4184,7 +4184,7 @@ class PROTOBUF_EXPORT EnumOptions final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT EnumValueOptions final : class PROTOBUF_EXPORT EnumValueOptions :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumValueOptions) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumValueOptions) */ {
public: public:
EnumValueOptions(); EnumValueOptions();
@ -4337,7 +4337,7 @@ class PROTOBUF_EXPORT EnumValueOptions final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT ServiceOptions final : class PROTOBUF_EXPORT ServiceOptions :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ServiceOptions) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ServiceOptions) */ {
public: public:
ServiceOptions(); ServiceOptions();
@ -4490,7 +4490,7 @@ class PROTOBUF_EXPORT ServiceOptions final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT MethodOptions final : class PROTOBUF_EXPORT MethodOptions :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.MethodOptions) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.MethodOptions) */ {
public: public:
MethodOptions(); MethodOptions();
@ -4679,7 +4679,7 @@ class PROTOBUF_EXPORT MethodOptions final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT UninterpretedOption_NamePart final : class PROTOBUF_EXPORT UninterpretedOption_NamePart :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.UninterpretedOption.NamePart) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.UninterpretedOption.NamePart) */ {
public: public:
UninterpretedOption_NamePart(); UninterpretedOption_NamePart();
@ -4842,7 +4842,7 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT UninterpretedOption final : class PROTOBUF_EXPORT UninterpretedOption :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.UninterpretedOption) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.UninterpretedOption) */ {
public: public:
UninterpretedOption(); UninterpretedOption();
@ -5079,7 +5079,7 @@ class PROTOBUF_EXPORT UninterpretedOption final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT SourceCodeInfo_Location final : class PROTOBUF_EXPORT SourceCodeInfo_Location :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.SourceCodeInfo.Location) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.SourceCodeInfo.Location) */ {
public: public:
SourceCodeInfo_Location(); SourceCodeInfo_Location();
@ -5301,7 +5301,7 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT SourceCodeInfo final : class PROTOBUF_EXPORT SourceCodeInfo :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.SourceCodeInfo) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.SourceCodeInfo) */ {
public: public:
SourceCodeInfo(); SourceCodeInfo();
@ -5445,7 +5445,7 @@ class PROTOBUF_EXPORT SourceCodeInfo final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final : class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.GeneratedCodeInfo.Annotation) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.GeneratedCodeInfo.Annotation) */ {
public: public:
GeneratedCodeInfo_Annotation(); GeneratedCodeInfo_Annotation();
@ -5627,7 +5627,7 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT GeneratedCodeInfo final : class PROTOBUF_EXPORT GeneratedCodeInfo :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.GeneratedCodeInfo) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.GeneratedCodeInfo) */ {
public: public:
GeneratedCodeInfo(); GeneratedCodeInfo();

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update #error incompatible with your Protocol Buffer headers. Please update
#error your headers. #error your headers.
#endif #endif
#if 3007000 < PROTOBUF_MIN_PROTOC_VERSION #if 3007001 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc.
@ -65,7 +65,7 @@ PROTOBUF_NAMESPACE_OPEN
// =================================================================== // ===================================================================
class PROTOBUF_EXPORT Duration final : class PROTOBUF_EXPORT Duration :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Duration) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Duration) */ {
public: public:
Duration(); Duration();

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update #error incompatible with your Protocol Buffer headers. Please update
#error your headers. #error your headers.
#endif #endif
#if 3007000 < PROTOBUF_MIN_PROTOC_VERSION #if 3007001 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc.
@ -65,7 +65,7 @@ PROTOBUF_NAMESPACE_OPEN
// =================================================================== // ===================================================================
class PROTOBUF_EXPORT Empty final : class PROTOBUF_EXPORT Empty :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Empty) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Empty) */ {
public: public:
Empty(); Empty();

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update #error incompatible with your Protocol Buffer headers. Please update
#error your headers. #error your headers.
#endif #endif
#if 3007000 < PROTOBUF_MIN_PROTOC_VERSION #if 3007001 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc.
@ -65,7 +65,7 @@ PROTOBUF_NAMESPACE_OPEN
// =================================================================== // ===================================================================
class PROTOBUF_EXPORT FieldMask final : class PROTOBUF_EXPORT FieldMask :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FieldMask) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FieldMask) */ {
public: public:
FieldMask(); FieldMask();

@ -97,6 +97,9 @@
#ifdef PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC #ifdef PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC
#error PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC was previously defined #error PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC was previously defined
#endif #endif
#ifdef PROTOBUF_MIN_PROTOC_VERSION
#error PROTOBUF_MIN_PROTOC_VERSION was previously defined
#endif
#ifdef PROTOBUF_PREDICT_TRUE #ifdef PROTOBUF_PREDICT_TRUE
#error PROTOBUF_PREDICT_TRUE was previously defined #error PROTOBUF_PREDICT_TRUE was previously defined
#endif #endif
@ -282,8 +285,9 @@
// Shared google3/opensource definitions. ////////////////////////////////////// // Shared google3/opensource definitions. //////////////////////////////////////
#define PROTOBUF_VERSION 3007000 #define PROTOBUF_VERSION 3007001
#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC 3007000 #define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC 3007000
#define PROTOBUF_MIN_PROTOC_VERSION 3007000
#define PROTOBUF_VERSION_SUFFIX "" #define PROTOBUF_VERSION_SUFFIX ""
// The minimum library version which works with the current version of the // The minimum library version which works with the current version of the

@ -50,6 +50,7 @@
#undef PROTOBUF_VERSION_SUFFIX #undef PROTOBUF_VERSION_SUFFIX
#undef PROTOBUF_FIELD_OFFSET #undef PROTOBUF_FIELD_OFFSET
#undef PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC #undef PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC
#undef PROTOBUF_MIN_PROTOC_VERSION
#undef PROTOBUF_PREDICT_TRUE #undef PROTOBUF_PREDICT_TRUE
#undef PROTOBUF_PREDICT_FALSE #undef PROTOBUF_PREDICT_FALSE
#undef PROTOBUF_LONGLONG #undef PROTOBUF_LONGLONG

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update #error incompatible with your Protocol Buffer headers. Please update
#error your headers. #error your headers.
#endif #endif
#if 3007000 < PROTOBUF_MIN_PROTOC_VERSION #if 3007001 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc.
@ -65,7 +65,7 @@ PROTOBUF_NAMESPACE_OPEN
// =================================================================== // ===================================================================
class PROTOBUF_EXPORT SourceContext final : class PROTOBUF_EXPORT SourceContext :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.SourceContext) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.SourceContext) */ {
public: public:
SourceContext(); SourceContext();

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update #error incompatible with your Protocol Buffer headers. Please update
#error your headers. #error your headers.
#endif #endif
#if 3007000 < PROTOBUF_MIN_PROTOC_VERSION #if 3007001 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc.
@ -126,7 +126,7 @@ public:
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT Struct final : class PROTOBUF_EXPORT Struct :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Struct) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Struct) */ {
public: public:
Struct(); Struct();
@ -263,7 +263,7 @@ class PROTOBUF_EXPORT Struct final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT Value final : class PROTOBUF_EXPORT Value :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Value) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Value) */ {
public: public:
Value(); Value();
@ -491,7 +491,7 @@ class PROTOBUF_EXPORT Value final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT ListValue final : class PROTOBUF_EXPORT ListValue :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ListValue) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ListValue) */ {
public: public:
ListValue(); ListValue();

@ -81,15 +81,11 @@ namespace internal {
// The current version, represented as a single integer to make comparison // The current version, represented as a single integer to make comparison
// easier: major * 10^6 + minor * 10^3 + micro // easier: major * 10^6 + minor * 10^3 + micro
#define GOOGLE_PROTOBUF_VERSION 3007000 #define GOOGLE_PROTOBUF_VERSION 3007001
// A suffix string for alpha, beta or rc releases. Empty for stable releases. // A suffix string for alpha, beta or rc releases. Empty for stable releases.
#define GOOGLE_PROTOBUF_VERSION_SUFFIX "" #define GOOGLE_PROTOBUF_VERSION_SUFFIX ""
// The minimum library version which works with the current version of the
// headers.
#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION 3007000
// The minimum header version which works with the current version of // The minimum header version which works with the current version of
// the library. This constant should only be used by protoc's C++ code // the library. This constant should only be used by protoc's C++ code
// generator. // generator.

@ -206,6 +206,7 @@ message TestAllTypesProto3 {
repeated google.protobuf.Struct repeated_struct = 324; repeated google.protobuf.Struct repeated_struct = 324;
repeated google.protobuf.Any repeated_any = 315; repeated google.protobuf.Any repeated_any = 315;
repeated google.protobuf.Value repeated_value = 316; repeated google.protobuf.Value repeated_value = 316;
repeated google.protobuf.ListValue repeated_list_value = 317;
// Test field-name-to-JSON-name convention. // Test field-name-to-JSON-name convention.
// (protobuf says names can be any valid C/C++ identifier.) // (protobuf says names can be any valid C/C++ identifier.)

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update #error incompatible with your Protocol Buffer headers. Please update
#error your headers. #error your headers.
#endif #endif
#if 3007000 < PROTOBUF_MIN_PROTOC_VERSION #if 3007001 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc.
@ -65,7 +65,7 @@ PROTOBUF_NAMESPACE_OPEN
// =================================================================== // ===================================================================
class PROTOBUF_EXPORT Timestamp final : class PROTOBUF_EXPORT Timestamp :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Timestamp) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Timestamp) */ {
public: public:
Timestamp(); Timestamp();

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update #error incompatible with your Protocol Buffer headers. Please update
#error your headers. #error your headers.
#endif #endif
#if 3007000 < PROTOBUF_MIN_PROTOC_VERSION #if 3007001 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc.
@ -166,7 +166,7 @@ inline bool Syntax_Parse(
} }
// =================================================================== // ===================================================================
class PROTOBUF_EXPORT Type final : class PROTOBUF_EXPORT Type :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Type) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Type) */ {
public: public:
Type(); Type();
@ -374,7 +374,7 @@ class PROTOBUF_EXPORT Type final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT Field final : class PROTOBUF_EXPORT Field :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Field) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Field) */ {
public: public:
Field(); Field();
@ -721,7 +721,7 @@ class PROTOBUF_EXPORT Field final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT Enum final : class PROTOBUF_EXPORT Enum :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Enum) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Enum) */ {
public: public:
Enum(); Enum();
@ -910,7 +910,7 @@ class PROTOBUF_EXPORT Enum final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT EnumValue final : class PROTOBUF_EXPORT EnumValue :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumValue) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumValue) */ {
public: public:
EnumValue(); EnumValue();
@ -1073,7 +1073,7 @@ class PROTOBUF_EXPORT EnumValue final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT Option final : class PROTOBUF_EXPORT Option :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Option) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Option) */ {
public: public:
Option(); Option();

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update #error incompatible with your Protocol Buffer headers. Please update
#error your headers. #error your headers.
#endif #endif
#if 3007000 < PROTOBUF_MIN_PROTOC_VERSION #if 3007001 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc.
@ -97,7 +97,7 @@ PROTOBUF_NAMESPACE_OPEN
// =================================================================== // ===================================================================
class PROTOBUF_EXPORT DoubleValue final : class PROTOBUF_EXPORT DoubleValue :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.DoubleValue) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.DoubleValue) */ {
public: public:
DoubleValue(); DoubleValue();
@ -225,7 +225,7 @@ class PROTOBUF_EXPORT DoubleValue final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT FloatValue final : class PROTOBUF_EXPORT FloatValue :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FloatValue) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FloatValue) */ {
public: public:
FloatValue(); FloatValue();
@ -353,7 +353,7 @@ class PROTOBUF_EXPORT FloatValue final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT Int64Value final : class PROTOBUF_EXPORT Int64Value :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Int64Value) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Int64Value) */ {
public: public:
Int64Value(); Int64Value();
@ -481,7 +481,7 @@ class PROTOBUF_EXPORT Int64Value final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT UInt64Value final : class PROTOBUF_EXPORT UInt64Value :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.UInt64Value) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.UInt64Value) */ {
public: public:
UInt64Value(); UInt64Value();
@ -609,7 +609,7 @@ class PROTOBUF_EXPORT UInt64Value final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT Int32Value final : class PROTOBUF_EXPORT Int32Value :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Int32Value) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Int32Value) */ {
public: public:
Int32Value(); Int32Value();
@ -737,7 +737,7 @@ class PROTOBUF_EXPORT Int32Value final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT UInt32Value final : class PROTOBUF_EXPORT UInt32Value :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.UInt32Value) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.UInt32Value) */ {
public: public:
UInt32Value(); UInt32Value();
@ -865,7 +865,7 @@ class PROTOBUF_EXPORT UInt32Value final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT BoolValue final : class PROTOBUF_EXPORT BoolValue :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.BoolValue) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.BoolValue) */ {
public: public:
BoolValue(); BoolValue();
@ -993,7 +993,7 @@ class PROTOBUF_EXPORT BoolValue final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT StringValue final : class PROTOBUF_EXPORT StringValue :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.StringValue) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.StringValue) */ {
public: public:
StringValue(); StringValue();
@ -1136,7 +1136,7 @@ class PROTOBUF_EXPORT StringValue final :
}; };
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class PROTOBUF_EXPORT BytesValue final : class PROTOBUF_EXPORT BytesValue :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.BytesValue) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.BytesValue) */ {
public: public:
BytesValue(); BytesValue();

@ -48,6 +48,10 @@ build_cpp_tcmalloc() {
} }
build_cpp_distcheck() { build_cpp_distcheck() {
grep -q -- "-Og" src/Makefile.am &&
echo "The -Og flag is incompatible with Clang versions older than 4.0." &&
exit 1
# Initialize any submodules. # Initialize any submodules.
git submodule update --init --recursive git submodule update --init --recursive
./autogen.sh ./autogen.sh

@ -101,7 +101,7 @@ def UpdateConfigure():
def UpdateCpp(): def UpdateCpp():
cpp_version = '%s00%s00%s' % ( cpp_version = '%s00%s00%s' % (
NEW_VERSION_INFO[0], NEW_VERSION_INFO[1], NEW_VERSION_INFO[2]) NEW_VERSION_INFO[0], NEW_VERSION_INFO[1], NEW_VERSION_INFO[2])
def RewriteCpp(line): def RewriteCommon(line):
line = re.sub( line = re.sub(
r'^#define GOOGLE_PROTOBUF_VERSION .*$', r'^#define GOOGLE_PROTOBUF_VERSION .*$',
'#define GOOGLE_PROTOBUF_VERSION %s' % cpp_version, '#define GOOGLE_PROTOBUF_VERSION %s' % cpp_version,
@ -111,10 +111,6 @@ def UpdateCpp():
'#define PROTOBUF_VERSION %s' % cpp_version, '#define PROTOBUF_VERSION %s' % cpp_version,
line) line)
if NEW_VERSION_INFO[2] == '0': if NEW_VERSION_INFO[2] == '0':
line = re.sub(
r'^#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION .*$',
'#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION %s' % cpp_version,
line)
line = re.sub( line = re.sub(
r'^#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC .*$', r'^#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC .*$',
'#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC %s' % cpp_version, '#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC %s' % cpp_version,
@ -132,8 +128,27 @@ def UpdateCpp():
'static const int kMinHeaderVersionForProtoc = %s;' % cpp_version, 'static const int kMinHeaderVersionForProtoc = %s;' % cpp_version,
line) line)
return line return line
RewriteTextFile('src/google/protobuf/stubs/common.h', RewriteCpp) def RewritePortDef(line):
RewriteTextFile('src/google/protobuf/port_def.inc', RewriteCpp) line = re.sub(
r'^#define PROTOBUF_VERSION .*$',
'#define PROTOBUF_VERSION %s' % cpp_version,
line)
if NEW_VERSION_INFO[2] == '0':
line = re.sub(
r'^#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC .*$',
'#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC %s' % cpp_version,
line)
line = re.sub(
r'^#define PROTOBUF_MIN_PROTOC_VERSION .*$',
'#define PROTOBUF_MIN_PROTOC_VERSION %s' % cpp_version,
line)
line = re.sub(
r'^#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION .*$',
'#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION %s' % cpp_version,
line)
return line
RewriteTextFile('src/google/protobuf/stubs/common.h', RewriteCommon)
RewriteTextFile('src/google/protobuf/port_def.inc', RewritePortDef)
def UpdateCsharp(): def UpdateCsharp():

Loading…
Cancel
Save