Merge pull request #5953 from acozzette/merge-3-7-x

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

@ -5,7 +5,7 @@
# dependent projects use the :git notation to refer to the library.
Pod::Spec.new do |s|
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.homepage = 'https://github.com/protocolbuffers/protobuf'
s.license = '3-Clause BSD License'

@ -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\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\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\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

@ -17,7 +17,7 @@ AC_PREREQ(2.59)
# 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
# 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])
@ -165,6 +165,10 @@ AS_IF([test "$with_zlib" != no], [
])
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
AC_MSG_CHECKING(whether -latomic is needed)
AC_LINK_IFELSE([AC_LANG_SOURCE([[
@ -214,8 +218,6 @@ case "$target_os" in
esac
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,
# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock
# too.

@ -2139,6 +2139,24 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() {
}
}
)");
RunValidJsonTest(
"StructWithEmptyListValue", REQUIRED,
R"({
"optionalStruct": {
"listValue": []
}
})",
R"(
optional_struct: {
fields: {
key: "listValue"
value: {
list_value: {
}
}
}
}
)");
// Value
RunValidJsonTest(
"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
RunValidJsonTest(

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

@ -65,4 +65,3 @@ Required.Proto3.JsonInput.IgnoreUnknownJsonNumber.ProtobufOutput
Required.Proto3.JsonInput.IgnoreUnknownJsonObject.ProtobufOutput
Required.Proto3.JsonInput.IgnoreUnknownJsonString.ProtobufOutput
Required.Proto3.JsonInput.IgnoreUnknownJsonTrue.ProtobufOutput
Required.Proto3.JsonInput.EmptyFieldMask.JsonOutput

@ -70,4 +70,3 @@ Required.Proto3.JsonInput.IgnoreUnknownJsonObject.ProtobufOutput
Required.Proto3.JsonInput.IgnoreUnknownJsonString.ProtobufOutput
Required.Proto3.JsonInput.IgnoreUnknownJsonTrue.ProtobufOutput
Recommended.Proto3.JsonInput.FieldMaskInvalidCharacter
Required.Proto3.JsonInput.EmptyFieldMask.JsonOutput

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

@ -29,7 +29,7 @@ namespace ProtobufTestMessages.Proto3 {
"dWYvYW55LnByb3RvGh5nb29nbGUvcHJvdG9idWYvZHVyYXRpb24ucHJvdG8a",
"IGdvb2dsZS9wcm90b2J1Zi9maWVsZF9tYXNrLnByb3RvGhxnb29nbGUvcHJv",
"dG9idWYvc3RydWN0LnByb3RvGh9nb29nbGUvcHJvdG9idWYvdGltZXN0YW1w",
"LnByb3RvGh5nb29nbGUvcHJvdG9idWYvd3JhcHBlcnMucHJvdG8i7TwKElRl",
"LnByb3RvGh5nb29nbGUvcHJvdG9idWYvd3JhcHBlcnMucHJvdG8ipz0KElRl",
"c3RBbGxUeXBlc1Byb3RvMxIWCg5vcHRpb25hbF9pbnQzMhgBIAEoBRIWCg5v",
"cHRpb25hbF9pbnQ2NBgCIAEoAxIXCg9vcHRpb25hbF91aW50MzIYAyABKA0S",
"FwoPb3B0aW9uYWxfdWludDY0GAQgASgEEhcKD29wdGlvbmFsX3NpbnQzMhgF",
@ -158,59 +158,60 @@ namespace ProtobufTestMessages.Proto3 {
"LnByb3RvYnVmLkZpZWxkTWFzaxIxCg9yZXBlYXRlZF9zdHJ1Y3QYxAIgAygL",
"MhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdBIrCgxyZXBlYXRlZF9hbnkYuwIg",
"AygLMhQuZ29vZ2xlLnByb3RvYnVmLkFueRIvCg5yZXBlYXRlZF92YWx1ZRi8",
"AiADKAsyFi5nb29nbGUucHJvdG9idWYuVmFsdWUSEwoKZmllbGRuYW1lMRiR",
"AyABKAUSFAoLZmllbGRfbmFtZTIYkgMgASgFEhUKDF9maWVsZF9uYW1lMxiT",
"AyABKAUSFgoNZmllbGRfX25hbWU0XxiUAyABKAUSFAoLZmllbGQwbmFtZTUY",
"lQMgASgFEhYKDWZpZWxkXzBfbmFtZTYYlgMgASgFEhMKCmZpZWxkTmFtZTcY",
"lwMgASgFEhMKCkZpZWxkTmFtZTgYmAMgASgFEhQKC2ZpZWxkX05hbWU5GJkD",
"IAEoBRIVCgxGaWVsZF9OYW1lMTAYmgMgASgFEhUKDEZJRUxEX05BTUUxMRib",
"AyABKAUSFQoMRklFTERfbmFtZTEyGJwDIAEoBRIXCg5fX2ZpZWxkX25hbWUx",
"MxidAyABKAUSFwoOX19GaWVsZF9uYW1lMTQYngMgASgFEhYKDWZpZWxkX19u",
"YW1lMTUYnwMgASgFEhYKDWZpZWxkX19OYW1lMTYYoAMgASgFEhcKDmZpZWxk",
"X25hbWUxN19fGKEDIAEoBRIXCg5GaWVsZF9uYW1lMThfXxiiAyABKAUaYgoN",
"TmVzdGVkTWVzc2FnZRIJCgFhGAEgASgFEkYKC2NvcmVjdXJzaXZlGAIgASgL",
"MjEucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5wcm90bzMuVGVzdEFsbFR5cGVz",
"UHJvdG8zGjQKEk1hcEludDMySW50MzJFbnRyeRILCgNrZXkYASABKAUSDQoF",
"dmFsdWUYAiABKAU6AjgBGjQKEk1hcEludDY0SW50NjRFbnRyeRILCgNrZXkY",
"ASABKAMSDQoFdmFsdWUYAiABKAM6AjgBGjYKFE1hcFVpbnQzMlVpbnQzMkVu",
"dHJ5EgsKA2tleRgBIAEoDRINCgV2YWx1ZRgCIAEoDToCOAEaNgoUTWFwVWlu",
"dDY0VWludDY0RW50cnkSCwoDa2V5GAEgASgEEg0KBXZhbHVlGAIgASgEOgI4",
"ARo2ChRNYXBTaW50MzJTaW50MzJFbnRyeRILCgNrZXkYASABKBESDQoFdmFs",
"dWUYAiABKBE6AjgBGjYKFE1hcFNpbnQ2NFNpbnQ2NEVudHJ5EgsKA2tleRgB",
"IAEoEhINCgV2YWx1ZRgCIAEoEjoCOAEaOAoWTWFwRml4ZWQzMkZpeGVkMzJF",
"bnRyeRILCgNrZXkYASABKAcSDQoFdmFsdWUYAiABKAc6AjgBGjgKFk1hcEZp",
"eGVkNjRGaXhlZDY0RW50cnkSCwoDa2V5GAEgASgGEg0KBXZhbHVlGAIgASgG",
"OgI4ARo6ChhNYXBTZml4ZWQzMlNmaXhlZDMyRW50cnkSCwoDa2V5GAEgASgP",
"Eg0KBXZhbHVlGAIgASgPOgI4ARo6ChhNYXBTZml4ZWQ2NFNmaXhlZDY0RW50",
"cnkSCwoDa2V5GAEgASgQEg0KBXZhbHVlGAIgASgQOgI4ARo0ChJNYXBJbnQz",
"MkZsb2F0RW50cnkSCwoDa2V5GAEgASgFEg0KBXZhbHVlGAIgASgCOgI4ARo1",
"ChNNYXBJbnQzMkRvdWJsZUVudHJ5EgsKA2tleRgBIAEoBRINCgV2YWx1ZRgC",
"IAEoAToCOAEaMgoQTWFwQm9vbEJvb2xFbnRyeRILCgNrZXkYASABKAgSDQoF",
"dmFsdWUYAiABKAg6AjgBGjYKFE1hcFN0cmluZ1N0cmluZ0VudHJ5EgsKA2tl",
"eRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAEaNQoTTWFwU3RyaW5nQnl0ZXNF",
"bnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAw6AjgBGn4KG01hcFN0",
"cmluZ05lc3RlZE1lc3NhZ2VFbnRyeRILCgNrZXkYASABKAkSTgoFdmFsdWUY",
"AiABKAsyPy5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxs",
"VHlwZXNQcm90bzMuTmVzdGVkTWVzc2FnZToCOAEabQocTWFwU3RyaW5nRm9y",
"ZWlnbk1lc3NhZ2VFbnRyeRILCgNrZXkYASABKAkSPAoFdmFsdWUYAiABKAsy",
"LS5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3RvMy5Gb3JlaWduTWVzc2Fn",
"ZToCOAEaeAoYTWFwU3RyaW5nTmVzdGVkRW51bUVudHJ5EgsKA2tleRgBIAEo",
"CRJLCgV2YWx1ZRgCIAEoDjI8LnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJv",
"dG8zLlRlc3RBbGxUeXBlc1Byb3RvMy5OZXN0ZWRFbnVtOgI4ARpnChlNYXBT",
"dHJpbmdGb3JlaWduRW51bUVudHJ5EgsKA2tleRgBIAEoCRI5CgV2YWx1ZRgC",
"IAEoDjIqLnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8zLkZvcmVpZ25F",
"bnVtOgI4ASI5CgpOZXN0ZWRFbnVtEgcKA0ZPTxAAEgcKA0JBUhABEgcKA0JB",
"WhACEhAKA05FRxD///////////8BIlkKC0FsaWFzZWRFbnVtEg0KCUFMSUFT",
"X0ZPTxAAEg0KCUFMSUFTX0JBUhABEg0KCUFMSUFTX0JBWhACEgcKA1FVWBAC",
"EgcKA3F1eBACEgcKA2JBehACGgIQAUINCgtvbmVvZl9maWVsZEoGCPUDEP8D",
"IhsKDkZvcmVpZ25NZXNzYWdlEgkKAWMYASABKAUqQAoLRm9yZWlnbkVudW0S",
"DwoLRk9SRUlHTl9GT08QABIPCgtGT1JFSUdOX0JBUhABEg8KC0ZPUkVJR05f",
"QkFaEAJCOAooY29tLmdvb2dsZS5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLnBy",
"b3RvM0gB+AEBogIGUHJvdG8zYgZwcm90bzM="));
"AiADKAsyFi5nb29nbGUucHJvdG9idWYuVmFsdWUSOAoTcmVwZWF0ZWRfbGlz",
"dF92YWx1ZRi9AiADKAsyGi5nb29nbGUucHJvdG9idWYuTGlzdFZhbHVlEhMK",
"CmZpZWxkbmFtZTEYkQMgASgFEhQKC2ZpZWxkX25hbWUyGJIDIAEoBRIVCgxf",
"ZmllbGRfbmFtZTMYkwMgASgFEhYKDWZpZWxkX19uYW1lNF8YlAMgASgFEhQK",
"C2ZpZWxkMG5hbWU1GJUDIAEoBRIWCg1maWVsZF8wX25hbWU2GJYDIAEoBRIT",
"CgpmaWVsZE5hbWU3GJcDIAEoBRITCgpGaWVsZE5hbWU4GJgDIAEoBRIUCgtm",
"aWVsZF9OYW1lORiZAyABKAUSFQoMRmllbGRfTmFtZTEwGJoDIAEoBRIVCgxG",
"SUVMRF9OQU1FMTEYmwMgASgFEhUKDEZJRUxEX25hbWUxMhicAyABKAUSFwoO",
"X19maWVsZF9uYW1lMTMYnQMgASgFEhcKDl9fRmllbGRfbmFtZTE0GJ4DIAEo",
"BRIWCg1maWVsZF9fbmFtZTE1GJ8DIAEoBRIWCg1maWVsZF9fTmFtZTE2GKAD",
"IAEoBRIXCg5maWVsZF9uYW1lMTdfXxihAyABKAUSFwoORmllbGRfbmFtZTE4",
"X18YogMgASgFGmIKDU5lc3RlZE1lc3NhZ2USCQoBYRgBIAEoBRJGCgtjb3Jl",
"Y3Vyc2l2ZRgCIAEoCzIxLnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8z",
"LlRlc3RBbGxUeXBlc1Byb3RvMxo0ChJNYXBJbnQzMkludDMyRW50cnkSCwoD",
"a2V5GAEgASgFEg0KBXZhbHVlGAIgASgFOgI4ARo0ChJNYXBJbnQ2NEludDY0",
"RW50cnkSCwoDa2V5GAEgASgDEg0KBXZhbHVlGAIgASgDOgI4ARo2ChRNYXBV",
"aW50MzJVaW50MzJFbnRyeRILCgNrZXkYASABKA0SDQoFdmFsdWUYAiABKA06",
"AjgBGjYKFE1hcFVpbnQ2NFVpbnQ2NEVudHJ5EgsKA2tleRgBIAEoBBINCgV2",
"YWx1ZRgCIAEoBDoCOAEaNgoUTWFwU2ludDMyU2ludDMyRW50cnkSCwoDa2V5",
"GAEgASgREg0KBXZhbHVlGAIgASgROgI4ARo2ChRNYXBTaW50NjRTaW50NjRF",
"bnRyeRILCgNrZXkYASABKBISDQoFdmFsdWUYAiABKBI6AjgBGjgKFk1hcEZp",
"eGVkMzJGaXhlZDMyRW50cnkSCwoDa2V5GAEgASgHEg0KBXZhbHVlGAIgASgH",
"OgI4ARo4ChZNYXBGaXhlZDY0Rml4ZWQ2NEVudHJ5EgsKA2tleRgBIAEoBhIN",
"CgV2YWx1ZRgCIAEoBjoCOAEaOgoYTWFwU2ZpeGVkMzJTZml4ZWQzMkVudHJ5",
"EgsKA2tleRgBIAEoDxINCgV2YWx1ZRgCIAEoDzoCOAEaOgoYTWFwU2ZpeGVk",
"NjRTZml4ZWQ2NEVudHJ5EgsKA2tleRgBIAEoEBINCgV2YWx1ZRgCIAEoEDoC",
"OAEaNAoSTWFwSW50MzJGbG9hdEVudHJ5EgsKA2tleRgBIAEoBRINCgV2YWx1",
"ZRgCIAEoAjoCOAEaNQoTTWFwSW50MzJEb3VibGVFbnRyeRILCgNrZXkYASAB",
"KAUSDQoFdmFsdWUYAiABKAE6AjgBGjIKEE1hcEJvb2xCb29sRW50cnkSCwoD",
"a2V5GAEgASgIEg0KBXZhbHVlGAIgASgIOgI4ARo2ChRNYXBTdHJpbmdTdHJp",
"bmdFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBGjUKE01h",
"cFN0cmluZ0J5dGVzRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgM",
"OgI4ARp+ChtNYXBTdHJpbmdOZXN0ZWRNZXNzYWdlRW50cnkSCwoDa2V5GAEg",
"ASgJEk4KBXZhbHVlGAIgASgLMj8ucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5w",
"cm90bzMuVGVzdEFsbFR5cGVzUHJvdG8zLk5lc3RlZE1lc3NhZ2U6AjgBGm0K",
"HE1hcFN0cmluZ0ZvcmVpZ25NZXNzYWdlRW50cnkSCwoDa2V5GAEgASgJEjwK",
"BXZhbHVlGAIgASgLMi0ucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5wcm90bzMu",
"Rm9yZWlnbk1lc3NhZ2U6AjgBGngKGE1hcFN0cmluZ05lc3RlZEVudW1FbnRy",
"eRILCgNrZXkYASABKAkSSwoFdmFsdWUYAiABKA4yPC5wcm90b2J1Zl90ZXN0",
"X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlwZXNQcm90bzMuTmVzdGVkRW51",
"bToCOAEaZwoZTWFwU3RyaW5nRm9yZWlnbkVudW1FbnRyeRILCgNrZXkYASAB",
"KAkSOQoFdmFsdWUYAiABKA4yKi5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLnBy",
"b3RvMy5Gb3JlaWduRW51bToCOAEiOQoKTmVzdGVkRW51bRIHCgNGT08QABIH",
"CgNCQVIQARIHCgNCQVoQAhIQCgNORUcQ////////////ASJZCgtBbGlhc2Vk",
"RW51bRINCglBTElBU19GT08QABINCglBTElBU19CQVIQARINCglBTElBU19C",
"QVoQAhIHCgNRVVgQAhIHCgNxdXgQAhIHCgNiQXoQAhoCEAFCDQoLb25lb2Zf",
"ZmllbGRKBgj1AxD/AyIbCg5Gb3JlaWduTWVzc2FnZRIJCgFjGAEgASgFKkAK",
"C0ZvcmVpZ25FbnVtEg8KC0ZPUkVJR05fRk9PEAASDwoLRk9SRUlHTl9CQVIQ",
"ARIPCgtGT1JFSUdOX0JBWhACQjgKKGNvbS5nb29nbGUucHJvdG9idWZfdGVz",
"dF9tZXNzYWdlcy5wcm90bzNIAfgBAaICBlByb3RvM2IGcHJvdG8z"));
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::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, }),
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();
repeatedAny_ = other.repeatedAny_.Clone();
repeatedValue_ = other.repeatedValue_.Clone();
repeatedListValue_ = other.repeatedListValue_.Clone();
fieldname1_ = other.fieldname1_;
fieldName2_ = other.fieldName2_;
FieldName3_ = other.FieldName3_;
@ -1508,6 +1510,16 @@ namespace ProtobufTestMessages.Proto3 {
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>
public const int Fieldname1FieldNumber = 401;
private int fieldname1_;
@ -1851,6 +1863,7 @@ namespace ProtobufTestMessages.Proto3 {
if(!repeatedStruct_.Equals(other.repeatedStruct_)) return false;
if(!repeatedAny_.Equals(other.repeatedAny_)) return false;
if(!repeatedValue_.Equals(other.repeatedValue_)) return false;
if(!repeatedListValue_.Equals(other.repeatedListValue_)) return false;
if (Fieldname1 != other.Fieldname1) return false;
if (FieldName2 != other.FieldName2) return false;
if (FieldName3 != other.FieldName3) return false;
@ -1978,6 +1991,7 @@ namespace ProtobufTestMessages.Proto3 {
hash ^= repeatedStruct_.GetHashCode();
hash ^= repeatedAny_.GetHashCode();
hash ^= repeatedValue_.GetHashCode();
hash ^= repeatedListValue_.GetHashCode();
if (Fieldname1 != 0) hash ^= Fieldname1.GetHashCode();
if (FieldName2 != 0) hash ^= FieldName2.GetHashCode();
if (FieldName3 != 0) hash ^= FieldName3.GetHashCode();
@ -2243,6 +2257,7 @@ namespace ProtobufTestMessages.Proto3 {
repeatedFieldmask_.WriteTo(output, _repeated_repeatedFieldmask_codec);
repeatedAny_.WriteTo(output, _repeated_repeatedAny_codec);
repeatedValue_.WriteTo(output, _repeated_repeatedValue_codec);
repeatedListValue_.WriteTo(output, _repeated_repeatedListValue_codec);
repeatedStruct_.WriteTo(output, _repeated_repeatedStruct_codec);
if (Fieldname1 != 0) {
output.WriteRawTag(136, 25);
@ -2520,6 +2535,7 @@ namespace ProtobufTestMessages.Proto3 {
size += repeatedStruct_.CalculateSize(_repeated_repeatedStruct_codec);
size += repeatedAny_.CalculateSize(_repeated_repeatedAny_codec);
size += repeatedValue_.CalculateSize(_repeated_repeatedValue_codec);
size += repeatedListValue_.CalculateSize(_repeated_repeatedListValue_codec);
if (Fieldname1 != 0) {
size += 2 + pb::CodedOutputStream.ComputeInt32Size(Fieldname1);
}
@ -2799,6 +2815,7 @@ namespace ProtobufTestMessages.Proto3 {
repeatedStruct_.Add(other.repeatedStruct_);
repeatedAny_.Add(other.repeatedAny_);
repeatedValue_.Add(other.repeatedValue_);
repeatedListValue_.Add(other.repeatedListValue_);
if (other.Fieldname1 != 0) {
Fieldname1 = other.Fieldname1;
}
@ -3376,6 +3393,10 @@ namespace ProtobufTestMessages.Proto3 {
repeatedValue_.AddEntriesFrom(input, _repeated_repeatedValue_codec);
break;
}
case 2538: {
repeatedListValue_.AddEntriesFrom(input, _repeated_repeatedListValue_codec);
break;
}
case 2594: {
repeatedStruct_.AddEntriesFrom(input, _repeated_repeatedStruct_codec);
break;

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

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

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

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

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

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

@ -23,7 +23,7 @@ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/
source $HOME/.rvm/scripts/rvm
brew uninstall node icu4c cmake
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
brew postinstall node

@ -896,8 +896,8 @@ const upb_filedef *parse_and_add_descriptor(const char *data,
const upb_filedef* file;
upb_status status;
set = google_protobuf_FileDescriptorSet_parsenew(
upb_strview_make(data, data_len), arena);
set = google_protobuf_FileDescriptorSet_parse(
data, data_len, arena);
if (!set) {
zend_error(E_ERROR, "Failed to parse binary descriptor\n");

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

@ -37,7 +37,7 @@
#include "upb.h"
#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 SIZEOF_INT64 8

@ -1,5 +1,4 @@
/* Amalgamated source file */
#define _XOPEN_SOURCE 700
#include "upb.h"
#ifndef UINTPTR_MAX
@ -1086,11 +1085,12 @@ static bool upb_decode_message(upb_decstate *d, const char *limit,
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;
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
@ -2836,7 +2836,8 @@ bool _upb_symtab_loaddefinit(upb_symtab *s, const upb_def_init *init) {
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) {
upb_status_seterrf(
@ -5364,7 +5365,7 @@ bool upb_inttable_iter_isequal(const upb_inttable_iter *i1,
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).
* 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
** 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
** be complicated to compute correctly. Implemented properly, it may have
** 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.
*/
/* Need to define _XOPEN_SOURCE before any include to make strptime work. */
#define _XOPEN_SOURCE 700
#include <ctype.h>
#include <errno.h>
#include <float.h>
@ -8960,6 +8958,11 @@ typedef struct {
/* The table mapping json name to fielddef for this message. */
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
* submessages. This flag alters the start-of-object (open-brace) behavior to
* begin a sequence of mapentry messages rather than a single submessage. */
@ -8990,6 +8993,19 @@ typedef struct {
bool is_unknown_field;
} 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 {
upb_arena *arena;
const upb_json_parsermethod *method;
@ -9037,6 +9053,13 @@ struct upb_json_parser {
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 {
upb_arena *arena;
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
* 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);
upb_sink_startstr(p->top->sink, sel, 0, &inner->sink);
inner->m = p->top->m;
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;
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;
}
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);
}
#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) {
size_t len;
const char *buf;
/* 3 for GMT and 1 for ending 0 */
char timestamp_buf[UPB_TIMESTAMP_BASE_SIZE + 4];
static void start_month(upb_json_parser *p, const char *ptr) {
capture_begin(p, ptr);
}
static bool end_month(upb_json_parser *p, const char *ptr) {
if (!capture_end(p, ptr)) {
return false;
}
p->tm.tm_mon = parse_timestamp_number(p) - 1;
return true;
}
buf = accumulate_getptr(p, &len);
UPB_ASSERT(len == UPB_TIMESTAMP_BASE_SIZE);
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;
static void start_day(upb_json_parser *p, const char *ptr) {
capture_begin(p, ptr);
}
#if defined __MINGW32__ || defined __MINGW64__
upb_status_seterrf(p->status,
"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);
static bool end_day(upb_json_parser *p, const char *ptr) {
if (!capture_end(p, ptr)) {
return false;
}
#endif
p->tm.tm_mday = parse_timestamp_number(p);
return true;
}
/* Clean up buffer */
multipart_end(p);
multipart_startaccum(p);
static void start_hour(upb_json_parser *p, const char *ptr) {
capture_begin(p, ptr);
}
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;
}
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) {
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
* 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);
upb_sink_startstr(p->top->sink, sel, 0, &inner->sink);
inner->m = p->top->m;
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;
multipart_startaccum(p);
@ -10603,17 +10667,12 @@ static bool handle_mapentry(upb_json_parser *p) {
mapfield = p->top->mapfield;
mapentrymsg = upb_fielddef_msgsubdef(mapfield);
inner = p->top + 1;
inner = start_jsonparser_frame(p);
p->top->f = mapfield;
sel = getsel_for_handlertype(p, UPB_HANDLER_STARTSUBMSG);
upb_sink_startsubmsg(p->top->sink, sel, &inner->sink);
inner->m = mapentrymsg;
inner->name_table = NULL;
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
* 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;
if (!check_stack(p)) return false;
inner = p->top + 1;
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;
p->top = start_jsonparser_frame(p);
return true;
}
@ -10748,18 +10799,12 @@ static bool start_subobject(upb_json_parser *p) {
* context. */
if (!check_stack(p)) return false;
inner = p->top + 1;
inner = start_jsonparser_frame(p);
sel = getsel_for_handlertype(p, UPB_HANDLER_STARTSEQ);
upb_sink_startseq(p->top->sink, sel, &inner->sink);
inner->m = upb_fielddef_msgsubdef(p->top->f);
inner->name_table = NULL;
inner->mapfield = p->top->f;
inner->f = NULL;
inner->is_map = true;
inner->is_mapentry = false;
inner->is_any = false;
inner->any_frame = NULL;
inner->is_unknown_field = false;
p->top = inner;
return true;
@ -10771,16 +10816,11 @@ static bool start_subobject(upb_json_parser *p) {
* context. */
if (!check_stack(p)) return false;
inner = p->top + 1;
inner = start_jsonparser_frame(p);
sel = getsel_for_handlertype(p, UPB_HANDLER_STARTSUBMSG);
upb_sink_startsubmsg(p->top->sink, sel, &inner->sink);
inner->m = upb_fielddef_msgsubdef(p->top->f);
set_name_table(p, inner);
inner->f = NULL;
inner->is_map = false;
inner->is_mapentry = false;
inner->is_unknown_field = false;
p->top = inner;
if (is_wellknown_msg(p, UPB_WELLKNOWN_ANY)) {
@ -10877,10 +10917,14 @@ static bool start_array(upb_json_parser *p) {
} else {
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;
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;
start_value_object(p, VALUE_LISTVALUE);
if (!start_subobject(p)) return false;
@ -10888,14 +10932,7 @@ static bool start_array(upb_json_parser *p) {
}
if (p->top->is_unknown_field) {
inner = p->top + 1;
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 = start_jsonparser_frame(p);
inner->is_unknown_field = true;
p->top = inner;
@ -10911,17 +10948,12 @@ static bool start_array(upb_json_parser *p) {
if (!check_stack(p)) return false;
inner = p->top + 1;
inner = start_jsonparser_frame(p);
sel = getsel_for_handlertype(p, UPB_HANDLER_STARTSEQ);
upb_sink_startseq(p->top->sink, sel, &inner->sink);
inner->m = p->top->m;
inner->name_table = NULL;
inner->f = p->top->f;
inner->is_map = false;
inner->is_mapentry = false;
inner->is_any = false;
inner->any_frame = NULL;
inner->is_unknown_field = false;
inner->is_repeated = true;
p->top = inner;
return true;
@ -11287,27 +11319,30 @@ static bool does_fieldmask_end(upb_json_parser *p) {
* 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[] = {
0, 1, 0, 1, 1, 1, 3, 1,
4, 1, 6, 1, 7, 1, 8, 1,
9, 1, 10, 1, 11, 1, 12, 1,
13, 1, 24, 1, 26, 1, 28, 1,
29, 1, 31, 1, 32, 1, 33, 1,
35, 1, 37, 1, 38, 1, 39, 1,
40, 1, 42, 1, 43, 2, 4, 9,
2, 5, 6, 2, 7, 3, 2, 7,
9, 2, 14, 15, 2, 16, 17, 2,
18, 19, 2, 21, 23, 2, 22, 20,
2, 27, 25, 2, 29, 31, 2, 34,
2, 2, 35, 43, 2, 36, 25, 2,
38, 43, 2, 39, 43, 2, 40, 43,
2, 41, 30, 2, 42, 43, 3, 21,
23, 24, 4, 14, 15, 16, 17
9, 1, 11, 1, 12, 1, 13, 1,
14, 1, 15, 1, 16, 1, 17, 1,
18, 1, 19, 1, 20, 1, 22, 1,
23, 1, 24, 1, 35, 1, 37, 1,
39, 1, 40, 1, 42, 1, 43, 1,
44, 1, 46, 1, 48, 1, 49, 1,
50, 1, 51, 1, 53, 1, 54, 2,
4, 9, 2, 5, 6, 2, 7, 3,
2, 7, 9, 2, 21, 26, 2, 25,
10, 2, 27, 28, 2, 29, 30, 2,
32, 34, 2, 33, 31, 2, 38, 36,
2, 40, 42, 2, 45, 2, 2, 46,
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[] = {
@ -11491,30 +11526,30 @@ static const char _json_trans_targs[] = {
106
};
static const char _json_trans_actions[] = {
0, 0, 92, 86, 35, 0, 0, 0,
104, 41, 27, 0, 37, 0, 0, 0,
static const unsigned char _json_trans_actions[] = {
0, 0, 113, 107, 53, 0, 0, 0,
125, 59, 45, 0, 55, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 80, 33, 29, 0, 0, 27,
31, 31, 83, 0, 0, 0, 0, 0,
0, 0, 101, 51, 47, 0, 0, 45,
49, 49, 104, 0, 0, 0, 0, 0,
3, 0, 0, 0, 0, 0, 5, 15,
0, 0, 53, 7, 13, 0, 56, 9,
9, 9, 59, 62, 11, 17, 17, 17,
0, 0, 0, 19, 0, 21, 23, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 114, 65, 114, 0, 0, 0, 0,
0, 71, 0, 68, 68, 77, 25, 0,
110, 74, 92, 86, 35, 0, 0, 0,
104, 41, 51, 89, 27, 0, 37, 0,
0, 0, 0, 0, 0, 98, 0, 0,
0, 101, 0, 0, 0, 95, 0, 80,
33, 29, 0, 0, 27, 31, 31, 83,
0, 0, 107, 0, 39, 45, 47, 43,
49
0, 0, 71, 7, 13, 0, 74, 9,
9, 9, 77, 80, 11, 37, 37, 37,
0, 0, 0, 39, 0, 41, 86, 0,
0, 0, 17, 19, 0, 21, 23, 0,
25, 27, 0, 29, 31, 0, 33, 35,
0, 135, 83, 135, 0, 0, 0, 0,
0, 92, 0, 89, 89, 98, 43, 0,
131, 95, 113, 107, 53, 0, 0, 0,
125, 59, 69, 110, 45, 0, 55, 0,
0, 0, 0, 0, 0, 119, 0, 0,
0, 122, 0, 0, 0, 116, 0, 101,
51, 47, 0, 0, 45, 49, 49, 104,
0, 0, 128, 0, 57, 63, 65, 61,
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,
@ -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, 39, 45, 47, 43, 49,
0, 0, 0, 57, 63, 65, 61, 67,
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;
#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,
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);
#line 2796 "upb/json/parser.c"
#line 2830 "upb/json/parser.c"
{
int _klen;
unsigned int _trans;
@ -11641,103 +11676,147 @@ _match:
switch ( *_acts++ )
{
case 1:
#line 2526 "upb/json/parser.rl"
#line 2557 "upb/json/parser.rl"
{ p--; {cs = stack[--top]; goto _again;} }
break;
case 2:
#line 2528 "upb/json/parser.rl"
#line 2559 "upb/json/parser.rl"
{ p--; {stack[top++] = cs; cs = 23;goto _again;} }
break;
case 3:
#line 2532 "upb/json/parser.rl"
#line 2563 "upb/json/parser.rl"
{ start_text(parser, p); }
break;
case 4:
#line 2533 "upb/json/parser.rl"
#line 2564 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_text(parser, p)); }
break;
case 5:
#line 2539 "upb/json/parser.rl"
#line 2570 "upb/json/parser.rl"
{ start_hex(parser); }
break;
case 6:
#line 2540 "upb/json/parser.rl"
#line 2571 "upb/json/parser.rl"
{ hexdigit(parser, p); }
break;
case 7:
#line 2541 "upb/json/parser.rl"
#line 2572 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_hex(parser)); }
break;
case 8:
#line 2547 "upb/json/parser.rl"
#line 2578 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(escape(parser, p)); }
break;
case 9:
#line 2553 "upb/json/parser.rl"
#line 2584 "upb/json/parser.rl"
{ p--; {cs = stack[--top]; goto _again;} }
break;
case 10:
#line 2565 "upb/json/parser.rl"
{ start_duration_base(parser, p); }
#line 2589 "upb/json/parser.rl"
{ start_year(parser, p); }
break;
case 11:
#line 2566 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_duration_base(parser, p)); }
#line 2590 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_year(parser, p)); }
break;
case 12:
#line 2568 "upb/json/parser.rl"
{ p--; {cs = stack[--top]; goto _again;} }
#line 2594 "upb/json/parser.rl"
{ start_month(parser, p); }
break;
case 13:
#line 2573 "upb/json/parser.rl"
{ start_timestamp_base(parser, p); }
#line 2595 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_month(parser, p)); }
break;
case 14:
#line 2574 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_timestamp_base(parser, p)); }
#line 2599 "upb/json/parser.rl"
{ start_day(parser, p); }
break;
case 15:
#line 2576 "upb/json/parser.rl"
{ start_timestamp_fraction(parser, p); }
#line 2600 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_day(parser, p)); }
break;
case 16:
#line 2577 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_timestamp_fraction(parser, p)); }
#line 2604 "upb/json/parser.rl"
{ start_hour(parser, p); }
break;
case 17:
#line 2579 "upb/json/parser.rl"
{ start_timestamp_zone(parser, p); }
#line 2605 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_hour(parser, p)); }
break;
case 18:
#line 2580 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_timestamp_zone(parser, p)); }
#line 2609 "upb/json/parser.rl"
{ start_minute(parser, p); }
break;
case 19:
#line 2582 "upb/json/parser.rl"
{ p--; {cs = stack[--top]; goto _again;} }
#line 2610 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_minute(parser, p)); }
break;
case 20:
#line 2587 "upb/json/parser.rl"
{ start_fieldmask_path_text(parser, p); }
#line 2614 "upb/json/parser.rl"
{ start_second(parser, p); }
break;
case 21:
#line 2588 "upb/json/parser.rl"
{ end_fieldmask_path_text(parser, p); }
#line 2615 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_second(parser, p)); }
break;
case 22:
#line 2593 "upb/json/parser.rl"
{ start_fieldmask_path(parser); }
#line 2620 "upb/json/parser.rl"
{ start_duration_base(parser, p); }
break;
case 23:
#line 2594 "upb/json/parser.rl"
{ end_fieldmask_path(parser); }
#line 2621 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_duration_base(parser, p)); }
break;
case 24:
#line 2600 "upb/json/parser.rl"
#line 2623 "upb/json/parser.rl"
{ p--; {cs = stack[--top]; goto _again;} }
break;
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)) {
{stack[top++] = cs; cs = 47;goto _again;}
@ -11750,12 +11829,12 @@ _match:
}
}
break;
case 26:
#line 2618 "upb/json/parser.rl"
case 37:
#line 2672 "upb/json/parser.rl"
{ p--; {stack[top++] = cs; cs = 78;goto _again;} }
break;
case 27:
#line 2623 "upb/json/parser.rl"
case 38:
#line 2677 "upb/json/parser.rl"
{
if (is_wellknown_msg(parser, UPB_WELLKNOWN_ANY)) {
start_any_member(parser, p);
@ -11764,12 +11843,12 @@ _match:
}
}
break;
case 28:
#line 2630 "upb/json/parser.rl"
case 39:
#line 2684 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_membername(parser)); }
break;
case 29:
#line 2633 "upb/json/parser.rl"
case 40:
#line 2687 "upb/json/parser.rl"
{
if (is_wellknown_msg(parser, UPB_WELLKNOWN_ANY)) {
end_any_member(parser, p);
@ -11778,8 +11857,8 @@ _match:
}
}
break;
case 30:
#line 2644 "upb/json/parser.rl"
case 41:
#line 2698 "upb/json/parser.rl"
{
if (is_wellknown_msg(parser, UPB_WELLKNOWN_ANY)) {
start_any_object(parser, p);
@ -11788,8 +11867,8 @@ _match:
}
}
break;
case 31:
#line 2653 "upb/json/parser.rl"
case 42:
#line 2707 "upb/json/parser.rl"
{
if (is_wellknown_msg(parser, UPB_WELLKNOWN_ANY)) {
CHECK_RETURN_TOP(end_any_object(parser, p));
@ -11798,55 +11877,55 @@ _match:
}
}
break;
case 32:
#line 2665 "upb/json/parser.rl"
case 43:
#line 2719 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(start_array(parser)); }
break;
case 33:
#line 2669 "upb/json/parser.rl"
case 44:
#line 2723 "upb/json/parser.rl"
{ end_array(parser); }
break;
case 34:
#line 2674 "upb/json/parser.rl"
case 45:
#line 2728 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(start_number(parser, p)); }
break;
case 35:
#line 2675 "upb/json/parser.rl"
case 46:
#line 2729 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_number(parser, p)); }
break;
case 36:
#line 2677 "upb/json/parser.rl"
case 47:
#line 2731 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(start_stringval(parser)); }
break;
case 37:
#line 2678 "upb/json/parser.rl"
case 48:
#line 2732 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_stringval(parser)); }
break;
case 38:
#line 2680 "upb/json/parser.rl"
case 49:
#line 2734 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_bool(parser, true)); }
break;
case 39:
#line 2682 "upb/json/parser.rl"
case 50:
#line 2736 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_bool(parser, false)); }
break;
case 40:
#line 2684 "upb/json/parser.rl"
case 51:
#line 2738 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_null(parser)); }
break;
case 41:
#line 2686 "upb/json/parser.rl"
case 52:
#line 2740 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(start_subobject_full(parser)); }
break;
case 42:
#line 2687 "upb/json/parser.rl"
case 53:
#line 2741 "upb/json/parser.rl"
{ end_subobject_full(parser); }
break;
case 43:
#line 2692 "upb/json/parser.rl"
case 54:
#line 2746 "upb/json/parser.rl"
{ p--; {cs = stack[--top]; goto _again;} }
break;
#line 3076 "upb/json/parser.c"
#line 3154 "upb/json/parser.c"
}
}
@ -11863,32 +11942,32 @@ _again:
while ( __nacts-- > 0 ) {
switch ( *__acts++ ) {
case 0:
#line 2524 "upb/json/parser.rl"
#line 2555 "upb/json/parser.rl"
{ p--; {cs = stack[--top]; if ( p == pe )
goto _test_eof;
goto _again;} }
break;
case 35:
#line 2675 "upb/json/parser.rl"
case 46:
#line 2729 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_number(parser, p)); }
break;
case 38:
#line 2680 "upb/json/parser.rl"
case 49:
#line 2734 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_bool(parser, true)); }
break;
case 39:
#line 2682 "upb/json/parser.rl"
case 50:
#line 2736 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_bool(parser, false)); }
break;
case 40:
#line 2684 "upb/json/parser.rl"
case 51:
#line 2738 "upb/json/parser.rl"
{ CHECK_RETURN_TOP(end_null(parser)); }
break;
case 42:
#line 2687 "upb/json/parser.rl"
case 53:
#line 2741 "upb/json/parser.rl"
{ end_subobject_full(parser); }
break;
#line 3118 "upb/json/parser.c"
#line 3196 "upb/json/parser.c"
}
}
}
@ -11896,7 +11975,7 @@ goto _again;} }
_out: {}
}
#line 2720 "upb/json/parser.rl"
#line 2774 "upb/json/parser.rl"
if (p != pe) {
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;
p->top = p->stack;
p->top->f = NULL;
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;
init_frame(p->top);
/* Emit Ragel initialization of the parser. */
#line 3174 "upb/json/parser.c"
#line 3247 "upb/json/parser.c"
{
cs = json_start;
top = 0;
}
#line 2767 "upb/json/parser.rl"
#line 2816 "upb/json/parser.rl"
p->current_state = cs;
p->parser_top = top;
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(handle);
print_data(p, "\"", 1);
while (remaining > 2) {
/* TODO(haberman): handle encoded lengths > sizeof(data) */
UPB_ASSERT((limit - to) >= 4);
if (limit - to < 4) {
bytes = to - data;
putstring(p, data, bytes);
to = data;
}
to[0] = base64[from[0] >> 2];
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;
print_data(p, "\"", 1);
putstring(p, data, bytes);
print_data(p, "\"", 1);
return len;

@ -869,7 +869,8 @@ UPB_INLINE bool _upb_has_oneof_field(const void *msg, size_t case_ofs, int32_t n
extern "C" {
#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
} /* extern "C" */
@ -1035,14 +1036,16 @@ typedef enum {
google_protobuf_MethodOptions_IDEMPOTENT = 2
} google_protobuf_MethodOptions_IdempotencyLevel;
/* google.protobuf.FileDescriptorSet */
UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_new(upb_arena *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);
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) {
return upb_encode(msg, &google_protobuf_FileDescriptorSet_msginit, arena, len);
@ -1070,9 +1073,10 @@ UPB_INLINE struct google_protobuf_FileDescriptorProto* google_protobuf_FileDescr
UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_new(upb_arena *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);
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) {
return upb_encode(msg, &google_protobuf_FileDescriptorProto_msginit, arena, len);
@ -1223,9 +1227,10 @@ UPB_INLINE void google_protobuf_FileDescriptorProto_set_syntax(google_protobuf_F
UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_new(upb_arena *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);
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) {
return upb_encode(msg, &google_protobuf_DescriptorProto_msginit, arena, len);
@ -1369,9 +1374,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) {
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);
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) {
return upb_encode(msg, &google_protobuf_DescriptorProto_ExtensionRange_msginit, arena, len);
@ -1412,9 +1418,10 @@ UPB_INLINE struct google_protobuf_ExtensionRangeOptions* google_protobuf_Descrip
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);
}
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);
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) {
return upb_encode(msg, &google_protobuf_DescriptorProto_ReservedRange_msginit, arena, len);
@ -1440,9 +1447,10 @@ UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_end(google_pro
UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_new(upb_arena *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);
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) {
return upb_encode(msg, &google_protobuf_ExtensionRangeOptions_msginit, arena, len);
@ -1470,9 +1478,10 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_Extension
UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_new(upb_arena *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);
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) {
return upb_encode(msg, &google_protobuf_FieldDescriptorProto_msginit, arena, len);
@ -1485,9 +1494,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 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 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 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 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); }
@ -1511,13 +1520,13 @@ UPB_INLINE void google_protobuf_FieldDescriptorProto_set_number(google_protobuf_
_upb_sethas(msg, 3);
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_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_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_sethas(msg, 7);
@ -1555,9 +1564,10 @@ UPB_INLINE void google_protobuf_FieldDescriptorProto_set_json_name(google_protob
UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_new(upb_arena *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);
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) {
return upb_encode(msg, &google_protobuf_OneofDescriptorProto_msginit, arena, len);
@ -1592,9 +1602,10 @@ UPB_INLINE struct google_protobuf_OneofOptions* google_protobuf_OneofDescriptorP
UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_new(upb_arena *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);
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) {
return upb_encode(msg, &google_protobuf_EnumDescriptorProto_msginit, arena, len);
@ -1668,9 +1679,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) {
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);
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) {
return upb_encode(msg, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena, len);
@ -1696,9 +1708,10 @@ UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end(go
UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_new(upb_arena *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);
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) {
return upb_encode(msg, &google_protobuf_EnumValueDescriptorProto_msginit, arena, len);
@ -1739,9 +1752,10 @@ UPB_INLINE struct google_protobuf_EnumValueOptions* google_protobuf_EnumValueDes
UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_new(upb_arena *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);
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) {
return upb_encode(msg, &google_protobuf_ServiceDescriptorProto_msginit, arena, len);
@ -1790,9 +1804,10 @@ UPB_INLINE struct google_protobuf_ServiceOptions* google_protobuf_ServiceDescrip
UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_new(upb_arena *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);
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) {
return upb_encode(msg, &google_protobuf_MethodDescriptorProto_msginit, arena, len);
@ -1851,9 +1866,10 @@ UPB_INLINE void google_protobuf_MethodDescriptorProto_set_server_streaming(googl
UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_new(upb_arena *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);
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) {
return upb_encode(msg, &google_protobuf_FileOptions_msginit, arena, len);
@ -1864,7 +1880,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 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 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_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); }
@ -1905,9 +1921,9 @@ UPB_INLINE void google_protobuf_FileOptions_set_java_outer_classname(google_prot
_upb_sethas(msg, 12);
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_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_sethas(msg, 2);
@ -1989,9 +2005,10 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FileOptio
UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_new(upb_arena *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);
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) {
return upb_encode(msg, &google_protobuf_MessageOptions_msginit, arena, len);
@ -2043,16 +2060,17 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MessageOp
UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_new(upb_arena *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);
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) {
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 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_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); }
@ -2060,14 +2078,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_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 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_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 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_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_sethas(msg, 3);
@ -2081,9 +2099,9 @@ UPB_INLINE void google_protobuf_FieldOptions_set_lazy(google_protobuf_FieldOptio
_upb_sethas(msg, 5);
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_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_sethas(msg, 6);
@ -2109,9 +2127,10 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FieldOpti
UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_new(upb_arena *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);
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) {
return upb_encode(msg, &google_protobuf_OneofOptions_msginit, arena, len);
@ -2139,9 +2158,10 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_OneofOpti
UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_new(upb_arena *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);
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) {
return upb_encode(msg, &google_protobuf_EnumOptions_msginit, arena, len);
@ -2181,9 +2201,10 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumOptio
UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_new(upb_arena *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);
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) {
return upb_encode(msg, &google_protobuf_EnumValueOptions_msginit, arena, len);
@ -2217,9 +2238,10 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumValue
UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_new(upb_arena *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);
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) {
return upb_encode(msg, &google_protobuf_ServiceOptions_msginit, arena, len);
@ -2253,9 +2275,10 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ServiceOp
UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_new(upb_arena *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);
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) {
return upb_encode(msg, &google_protobuf_MethodOptions_msginit, arena, len);
@ -2264,16 +2287,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_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 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 void google_protobuf_MethodOptions_set_deprecated(google_protobuf_MethodOptions *msg, bool value) {
_upb_sethas(msg, 2);
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_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) {
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 24), len);
@ -2295,9 +2318,10 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MethodOpt
UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_new(upb_arena *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);
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) {
return upb_encode(msg, &google_protobuf_UninterpretedOption_msginit, arena, len);
@ -2361,9 +2385,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) {
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);
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) {
return upb_encode(msg, &google_protobuf_UninterpretedOption_NamePart_msginit, arena, len);
@ -2389,9 +2414,10 @@ UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_is_extension(go
UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_new(upb_arena *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);
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) {
return upb_encode(msg, &google_protobuf_SourceCodeInfo_msginit, arena, len);
@ -2419,9 +2445,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) {
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);
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) {
return upb_encode(msg, &google_protobuf_SourceCodeInfo_Location_msginit, arena, len);
@ -2480,9 +2507,10 @@ UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_leading_detached_com
UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_new(upb_arena *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);
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) {
return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_msginit, arena, len);
@ -2510,9 +2538,10 @@ UPB_INLINE struct google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_
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);
}
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);
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) {
return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena, len);
@ -6729,6 +6758,18 @@ extern "C" {
* descriptor type (upb_descriptortype_t). */
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 **************************************************/
UPB_INLINE int32_t upb_zzdec_32(uint32_t n) {
@ -6835,6 +6876,9 @@ UPB_INLINE uint64_t upb_vencode32(uint32_t val) {
uint64_t ret = 0;
UPB_ASSERT(bytes <= 5);
memcpy(&ret, buf, bytes);
#ifdef UPB_BIG_ENDIAN
ret = byteswap64(ret);
#endif
UPB_ASSERT(ret <= 0xffffffffffU);
return ret;
}

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

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

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

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

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

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

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

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

@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/**
* 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\InputStream;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/**
* 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\InputStream;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/**
* 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\InputStream;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/**
* 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\InputStream;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\GPBWrapperUtils;
/**
* 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());
}
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()
{
$from = new TestMessage();

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

@ -140,9 +140,9 @@ checkDependencies ()
host_machine="$(uname -m)";
dump_cmd='ldd '"$1"
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
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
if [[ $host_machine != ppc64le ]];then
dump_cmd='objdump -p '"$1"' | grep NEEDED'

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

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

@ -1237,6 +1237,34 @@ static void putjsonany(VALUE msg_rb, const Descriptor* desc,
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,
upb_sink *sink, int depth, bool emit_defaults,
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_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);
return;
}
if (is_json &&
upb_msgdef_wellknowntype(desc->msgdef) == UPB_WELLKNOWN_LISTVALUE) {
putjsonlistvalue(msg_rb, desc, sink, depth, emit_defaults);
return;
}
if (open_msg) {
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|
s.name = "google-protobuf"
s.version = "3.7.0"
s.version = "3.7.1"
s.licenses = ["BSD-3-Clause"]
s.summary = "Protocol Buffers"
s.description = "Protocol Buffers are Google's data interchange format."

@ -36,8 +36,11 @@ test_version() {
cd ../ruby/compatibility_tests/v3.0.0 &&
cp -R ../../lib lib && ./test.sh"
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 \
"rvm install $version && rvm use $version && \
"rvm install $version --with-openssl-dir=`brew --prefix openssl` && \
rvm use $version && \
which ruby && \
git clean -f && \
gem install bundler -v 1.17.3 && bundle && \

@ -18,7 +18,7 @@ else
PTHREAD_DEF =
endif
PROTOBUF_VERSION = 18:0:0
PROTOBUF_VERSION = 18:1:0
if GCC
# 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_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)
TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#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 incompatible with your Protocol Buffer headers. Please
#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:
Any();

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#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 incompatible with your Protocol Buffer headers. Please
#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:
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:
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:
Mixin();

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

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

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#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 incompatible with your Protocol Buffer headers. Please
#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:
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:
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:
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:
CodeGeneratorResponse();

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#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 incompatible with your Protocol Buffer headers. Please
#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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
GeneratedCodeInfo();

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#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 incompatible with your Protocol Buffer headers. Please
#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:
Duration();

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#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 incompatible with your Protocol Buffer headers. Please
#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:
Empty();

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#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 incompatible with your Protocol Buffer headers. Please
#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:
FieldMask();

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

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

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#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 incompatible with your Protocol Buffer headers. Please
#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:
SourceContext();

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#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 incompatible with your Protocol Buffer headers. Please
#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:
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:
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:
ListValue();

@ -81,15 +81,11 @@ namespace internal {
// The current version, represented as a single integer to make comparison
// 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.
#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 library. This constant should only be used by protoc's C++ code
// generator.

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

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#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 incompatible with your Protocol Buffer headers. Please
#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:
Timestamp();

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#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 incompatible with your Protocol Buffer headers. Please
#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:
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:
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:
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:
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:
Option();

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#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 incompatible with your Protocol Buffer headers. Please
#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:
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:
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:
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:
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:
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:
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:
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:
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:
BytesValue();

@ -48,6 +48,10 @@ build_cpp_tcmalloc() {
}
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.
git submodule update --init --recursive
./autogen.sh

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

Loading…
Cancel
Save