Selaa lähdekoodia

Merge 3.9.x 201908071359 to master (#6484)

* Add changelog for 3.9.x

* Revert "Make php message class final to avoid mocking (#6277)" (#6324)

This reverts commit 7f84a943667358a53bd5d255ee9769ca83e75cd9.
This is just temporary. Eventually, we still want to roll forward this
change. Some users are complaining they need more time to clean up their
code.

* Update extract_includes.bat.in

File io_win32.h is not in directory google\protobuf\stubs under directory google\protobuf\io

* Set oneof case in array constructor (#6351)

Forgot to set it previously.

* Update protobuf version (#6366)

* Drop building wheel for python 3.4 (#6406)

https://github.com/matthew-brett/multibuild/pull/240

* Fix binary compatibility in FieldCodec factory methods (#6380) (#6424)

* Fix binary compatibility in FieldCodec factory messages

* Make default value parameter for current factories required

* Route old methods through default value overloads

* Remove ExtensionRegistry.Add(params) overload

* Rename ExtensionRegistry.Add(IEnumerable<Extension>) overload to AddRange

* Edit naming of parameters in Extension classes

* * Fix add API warnings to docs for extension APIs
* Rename internal ExtensionSet.GetValue to TryGetValue

* Disable javadoc error (#6371)

* Disable javadoc error

Actual fixes of the javadoc will be followed up

* Remove duplicated configuration

* Update javadoc plugin version

* Updated Bazel test script to use most recent Bazel version (#6413) (#6433)

I'm not exactly sure why, but this fixes the failing Bazel presubmit
test. Using the most recent version seems like a good idea anyway so
that we can make sure we're compatible with any new Bazel changes.

* [bazel] Add fixes for --incompatible_load_{cc,java,proto}_rules_from_bzl

* No need to update version in generated code (#6471)

generate_descriptor will handle that

* Update protobuf version (#6472)
Jie Luo 6 vuotta sitten
vanhempi
commit
43156775be
69 muutettua tiedostoa jossa 348 lisäystä ja 270 poistoa
  1. 53 0
      CHANGES.txt
  2. 1 1
      Protobuf.podspec
  3. 1 1
      configure.ac
  4. 1 1
      csharp/Google.Protobuf.Tools.nuspec
  5. 160 139
      csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs
  6. BIN
      csharp/src/Google.Protobuf.Test/testprotos.pb
  7. 9 7
      csharp/src/Google.Protobuf/Extension.cs
  8. 11 21
      csharp/src/Google.Protobuf/ExtensionRegistry.cs
  9. 6 13
      csharp/src/Google.Protobuf/ExtensionSet.cs
  10. 1 1
      csharp/src/Google.Protobuf/Google.Protobuf.csproj
  11. 1 1
      csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs
  12. 1 1
      java/bom/pom.xml
  13. 1 1
      java/core/pom.xml
  14. 1 1
      java/lite/pom.xml
  15. 8 2
      java/pom.xml
  16. 1 1
      java/util/pom.xml
  17. 1 1
      js/package.json
  18. 3 0
      php/ext/google/protobuf/message.c
  19. 34 6
      php/ext/google/protobuf/package.xml
  20. 3 1
      php/ext/google/protobuf/protobuf.h
  21. 2 2
      php/ext/google/protobuf/storage.c
  22. 1 1
      php/src/Google/Protobuf/Internal/DescriptorProto.php
  23. 1 1
      php/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php
  24. 1 1
      php/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php
  25. 1 1
      php/src/Google/Protobuf/Internal/EnumDescriptorProto.php
  26. 1 1
      php/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php
  27. 1 1
      php/src/Google/Protobuf/Internal/EnumOptions.php
  28. 1 1
      php/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php
  29. 1 1
      php/src/Google/Protobuf/Internal/EnumValueOptions.php
  30. 1 1
      php/src/Google/Protobuf/Internal/ExtensionRangeOptions.php
  31. 1 1
      php/src/Google/Protobuf/Internal/FieldDescriptorProto.php
  32. 1 1
      php/src/Google/Protobuf/Internal/FieldOptions.php
  33. 1 1
      php/src/Google/Protobuf/Internal/FileDescriptorProto.php
  34. 1 1
      php/src/Google/Protobuf/Internal/FileDescriptorSet.php
  35. 1 1
      php/src/Google/Protobuf/Internal/FileOptions.php
  36. 1 1
      php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php
  37. 1 1
      php/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php
  38. 1 1
      php/src/Google/Protobuf/Internal/MessageOptions.php
  39. 1 1
      php/src/Google/Protobuf/Internal/MethodDescriptorProto.php
  40. 1 1
      php/src/Google/Protobuf/Internal/MethodOptions.php
  41. 1 1
      php/src/Google/Protobuf/Internal/OneofDescriptorProto.php
  42. 1 1
      php/src/Google/Protobuf/Internal/OneofOptions.php
  43. 1 1
      php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php
  44. 1 1
      php/src/Google/Protobuf/Internal/ServiceOptions.php
  45. 1 1
      php/src/Google/Protobuf/Internal/SourceCodeInfo.php
  46. 1 1
      php/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php
  47. 1 1
      php/src/Google/Protobuf/Internal/UninterpretedOption.php
  48. 1 1
      php/src/Google/Protobuf/Internal/UninterpretedOption/NamePart.php
  49. 2 0
      php/tests/generated_class_test.php
  50. 1 1
      protoc-artifacts/pom.xml
  51. 1 1
      python/google/protobuf/__init__.py
  52. 1 1
      ruby/google-protobuf.gemspec
  53. 1 1
      src/Makefile.am
  54. 1 1
      src/google/protobuf/any.pb.h
  55. 1 1
      src/google/protobuf/api.pb.h
  56. 1 1
      src/google/protobuf/compiler/php/php_generator.cc
  57. 1 1
      src/google/protobuf/compiler/plugin.pb.h
  58. 1 1
      src/google/protobuf/descriptor.pb.h
  59. 1 1
      src/google/protobuf/duration.pb.h
  60. 1 1
      src/google/protobuf/empty.pb.h
  61. 1 1
      src/google/protobuf/field_mask.pb.h
  62. 1 1
      src/google/protobuf/port_def.inc
  63. 1 1
      src/google/protobuf/source_context.pb.h
  64. 1 1
      src/google/protobuf/struct.pb.h
  65. 1 1
      src/google/protobuf/stubs/common.h
  66. 1 1
      src/google/protobuf/timestamp.pb.h
  67. 1 1
      src/google/protobuf/type.pb.h
  68. 1 1
      src/google/protobuf/wrappers.pb.h
  69. 1 23
      update_version.py

+ 53 - 0
CHANGES.txt

@@ -1,3 +1,56 @@
+2019-06-28 version 3.9.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
+
+  C++
+  * Optimize and simplify implementation of RepeatedPtrFieldBase
+  * Don't create unnecessary unknown field sets.
+  * Remove branch from accessors to repeated field element array.
+  * Added delimited parse and serialize util.
+  * Reduce size by not emitting constants for fieldnumbers
+  * Fix a bug when comparing finite and infinite field values with explicit tolerances.
+  * TextFormat::Parser should use a custom Finder to look up extensions by number if one is provided.
+  * Add MessageLite::Utf8DebugString() to make MessageLite more compatible with Message.
+  * Fail fast for better performance in DescriptorPool::FindExtensionByNumber() if descriptor has no defined extensions.
+  * Adding the file name to help debug colliding extensions
+  * Added FieldDescriptor::PrintableNameForExtension() and DescriptorPool::FindExtensionByPrintableName().
+    The latter will replace Reflection::FindKnownExtensionByName().
+  * Replace NULL with nullptr
+  * Created a new Add method in repeated field that allows adding a range of elements all at once.
+  * Enabled enum name-to-value mapping functions for C++ lite
+  * Avoid dynamic initialization in descriptor.proto generated code
+  * Move stream functions to MessageLite from Message.
+  * Move all zero_copy_stream functionality to io_lite.
+  * Do not create array of matched fields for simple repeated fields
+  * Enabling silent mode by default to reduce make compilation noise. (#6237)
+
+  Java
+  * Expose TextFormat.Printer and make it configurable. Deprecate the static methods.
+  * Library for constructing google.protobuf.Struct and google.protobuf.Value
+  * Make OneofDescriptor extend GenericDescriptor.
+  * Expose streamingness of service methods from MethodDescriptor.
+  * Fix a bug where TextFormat fails to parse Any filed with > 1 embedded message sub-fields.
+  * Establish consistent JsonFormat behavior for nulls in oneofs, regardless of order.
+  * Update GSON version to 3.8.5. (#6268)
+  * Add `protobuf_java_lite` Bazel target. (#6177)
+
+  Python
+  * Change implementation of Name() for enums that allow aliases in proto2 in Python
+    to be in line with claims in C++ implementation (to return first value).
+  * Explicitly say what field cannot be set when the new value fails a type check.
+  * Duplicate register in descriptor pool will raise errors
+  * Add __slots__ to all well_known_types classes, custom attributes are not allowed anymore.
+  * text_format only present 8 valid digits for float fields by default
+
+  JavaScript
+  * Add Oneof enum to the list of goog.provide
+
+  PHP
+  * Make php message class final to avoid mocking. (#6277)
+  * Rename get/setXXXValue to get/setXXXWrapper. (#6295)
+
+  Ruby
+  * Remove to_hash methods. (#6166)
+
+
 2019-04-29 version 3.8.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
 
   C++

+ 1 - 1
Protobuf.podspec

@@ -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.9.0-rc2'
+  s.version  = '3.9.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'

+ 1 - 1
configure.ac

@@ -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.9.0-rc-1],[protobuf@googlegroups.com],[protobuf])
+AC_INIT([Protocol Buffers],[3.9.1],[protobuf@googlegroups.com],[protobuf])
 
 AM_MAINTAINER_MODE([enable])
 

+ 1 - 1
csharp/Google.Protobuf.Tools.nuspec

@@ -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.9.0-rc1</version>
+    <version>3.9.1</version>
     <authors>Google Inc.</authors>
     <owners>protobuf-packages</owners>
     <licenseUrl>https://github.com/protocolbuffers/protobuf/blob/master/LICENSE</licenseUrl>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 160 - 139
csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs


BIN
csharp/src/Google.Protobuf.Test/testprotos.pb


+ 9 - 7
csharp/src/Google.Protobuf/Extension.cs

@@ -35,7 +35,7 @@ using System;
 namespace Google.Protobuf
 {
     /// <summary>
-    /// Represents a non-generic extension definition
+    /// Represents a non-generic extension definition. This API is experimental and subject to change.
     /// </summary>
     public abstract class Extension
     {
@@ -44,9 +44,9 @@ namespace Google.Protobuf
         /// <summary>
         /// Internal use. Creates a new extension with the specified field number.
         /// </summary>
-        protected Extension(int number)
+        protected Extension(int fieldNumber)
         {
-            FieldNumber = number;
+            FieldNumber = fieldNumber;
         }
 
         internal abstract IExtensionValue CreateValue();
@@ -58,7 +58,8 @@ namespace Google.Protobuf
     }
 
     /// <summary>
-    /// Represents a type-safe extension identifier used for getting and setting single extension values in <see cref="IExtendableMessage{T}"/> instances
+    /// Represents a type-safe extension identifier used for getting and setting single extension values in <see cref="IExtendableMessage{T}"/> instances. 
+    /// This API is experimental and subject to change.
     /// </summary>
     /// <typeparam name="TTarget">The message type this field applies to</typeparam>
     /// <typeparam name="TValue">The field value type of this extension</typeparam>
@@ -69,7 +70,7 @@ namespace Google.Protobuf
         /// <summary>
         /// Creates a new extension identifier with the specified field number and codec
         /// </summary>
-        public Extension(int number, FieldCodec<TValue> codec) : base(number)
+        public Extension(int fieldNumber, FieldCodec<TValue> codec) : base(fieldNumber)
         {
             this.codec = codec;
         }
@@ -85,7 +86,8 @@ namespace Google.Protobuf
     }
 
     /// <summary>
-    /// Represents a type-safe extension identifier used for getting repeated extension values in <see cref="IExtendableMessage{T}"/> instances
+    /// Represents a type-safe extension identifier used for getting repeated extension values in <see cref="IExtendableMessage{T}"/> instances.
+    /// This API is experimental and subject to change.
     /// </summary>
     /// <typeparam name="TTarget">The message type this field applies to</typeparam>
     /// <typeparam name="TValue">The repeated field value type of this extension</typeparam>
@@ -96,7 +98,7 @@ namespace Google.Protobuf
         /// <summary>
         /// Creates a new repeated extension identifier with the specified field number and codec
         /// </summary>
-        public RepeatedExtension(int number, FieldCodec<TValue> codec) : base(number)
+        public RepeatedExtension(int fieldNumber, FieldCodec<TValue> codec) : base(fieldNumber)
         {
             this.codec = codec;
         }

+ 11 - 21
csharp/src/Google.Protobuf/ExtensionRegistry.cs

@@ -38,7 +38,7 @@ using System.Linq;
 namespace Google.Protobuf
 {
     /// <summary>
-    /// Provides extensions to messages while parsing
+    /// Provides extensions to messages while parsing. This API is experimental and subject to change.
     /// </summary>
     public sealed class ExtensionRegistry : ICollection<Extension>, IDeepCloneable<ExtensionRegistry>
     {
@@ -67,9 +67,9 @@ namespace Google.Protobuf
         /// </summary>
         bool ICollection<Extension>.IsReadOnly => false;
 
-        internal bool ContainsInputField(CodedInputStream stream, Type target, out Extension extension)
-        {
-            return extensions.TryGetValue(new ObjectIntPair<Type>(target, WireFormat.GetTagFieldNumber(stream.LastTag)), out extension);
+        internal bool ContainsInputField(CodedInputStream stream, Type target, out Extension extension)
+        {
+            return extensions.TryGetValue(new ObjectIntPair<Type>(target, WireFormat.GetTagFieldNumber(stream.LastTag)), out extension);
         }
 
         /// <summary>
@@ -82,24 +82,14 @@ namespace Google.Protobuf
             extensions.Add(new ObjectIntPair<Type>(extension.TargetType, extension.FieldNumber), extension);
         }
 
-        /// <summary>
-        /// Adds the specified extensions to the registry
-        /// </summary>
-        public void Add(params Extension[] newExtensions)
-        {
-            ProtoPreconditions.CheckNotNull(newExtensions, nameof(newExtensions));
-
-            Add((IEnumerable<Extension>)newExtensions);
-        }
-
         /// <summary>
         /// Adds the specified extensions to the reigstry
         /// </summary>
-        public void Add(IEnumerable<Extension> newExtensions)
+        public void AddRange(IEnumerable<Extension> extensions)
         {
-            ProtoPreconditions.CheckNotNull(newExtensions, nameof(newExtensions));
+            ProtoPreconditions.CheckNotNull(extensions, nameof(extensions));
 
-            foreach (var extension in newExtensions)
+            foreach (var extension in extensions)
                 Add(extension);
         }
 
@@ -134,10 +124,10 @@ namespace Google.Protobuf
             if (array.Length - arrayIndex < Count)
                 throw new ArgumentException("The provided array is shorter than the number of elements in the registry");
 
-            for (int i = 0; i < array.Length; i++)
-            {
-                Extension extension = array[i];
-                extensions.Add(new ObjectIntPair<Type>(extension.TargetType, extension.FieldNumber), extension);
+            for (int i = 0; i < array.Length; i++)
+            {
+                Extension extension = array[i];
+                extensions.Add(new ObjectIntPair<Type>(extension.TargetType, extension.FieldNumber), extension);
             }
         }
 

+ 6 - 13
csharp/src/Google.Protobuf/ExtensionSet.cs

@@ -40,11 +40,11 @@ namespace Google.Protobuf
     /// <summary>
     /// Methods for managing <see cref="ExtensionSet{TTarget}"/>s with null checking.
     /// 
-    /// Most users will not use this class directly
+    /// Most users will not use this class directly and its API is experimental and subject to change.
     /// </summary>
     public static class ExtensionSet
     {
-        private static bool GetValue<TTarget>(ref ExtensionSet<TTarget> set, Extension extension, out IExtensionValue value) where TTarget : IExtendableMessage<TTarget>
+        private static bool TryGetValue<TTarget>(ref ExtensionSet<TTarget> set, Extension extension, out IExtensionValue value) where TTarget : IExtendableMessage<TTarget>
         {
             if (set == null)
             {
@@ -60,7 +60,7 @@ namespace Google.Protobuf
         public static TValue Get<TTarget, TValue>(ref ExtensionSet<TTarget> set, Extension<TTarget, TValue> extension) where TTarget : IExtendableMessage<TTarget>
         {
             IExtensionValue value;
-            if (GetValue(ref set, extension, out value))
+            if (TryGetValue(ref set, extension, out value))
             {
                 return ((ExtensionValue<TValue>)value).GetValue();
             }
@@ -76,7 +76,7 @@ namespace Google.Protobuf
         public static RepeatedField<TValue> Get<TTarget, TValue>(ref ExtensionSet<TTarget> set, RepeatedExtension<TTarget, TValue> extension) where TTarget : IExtendableMessage<TTarget>
         {
             IExtensionValue value;
-            if (GetValue(ref set, extension, out value))
+            if (TryGetValue(ref set, extension, out value))
             {
                 return ((RepeatedExtensionValue<TValue>)value).GetValue();
             }
@@ -111,7 +111,7 @@ namespace Google.Protobuf
         }
 
         /// <summary>
-        /// Sets the value of the specified extension
+        /// Sets the value of the specified extension. This will make a new instance of ExtensionSet if the set is null.
         /// </summary>
         public static void Set<TTarget, TValue>(ref ExtensionSet<TTarget> set, Extension<TTarget, TValue> extension, TValue value) where TTarget : IExtendableMessage<TTarget>
         {
@@ -140,14 +140,7 @@ namespace Google.Protobuf
         public static bool Has<TTarget, TValue>(ref ExtensionSet<TTarget> set, Extension<TTarget, TValue> extension) where TTarget : IExtendableMessage<TTarget>
         {
             IExtensionValue value;
-            if (GetValue(ref set, extension, out value))
-            {
-                return ((ExtensionValue<TValue>)value).HasValue;
-            }
-            else 
-            {
-                return false;
-            }
+            return TryGetValue(ref set, extension, out value);
         }
 
         /// <summary>

+ 1 - 1
csharp/src/Google.Protobuf/Google.Protobuf.csproj

@@ -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.9.0-rc1</VersionPrefix>
+    <VersionPrefix>3.9.1</VersionPrefix>
     <LangVersion>6</LangVersion>
     <Authors>Google Inc.</Authors>
     <TargetFrameworks>netstandard1.0;netstandard2.0;net45</TargetFrameworks>

+ 1 - 1
csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs

@@ -407,7 +407,7 @@ namespace Google.Protobuf.Reflection
 
         private static void AddAllExtensions(FileDescriptor[] dependencies, GeneratedClrTypeInfo generatedInfo, ExtensionRegistry registry)
         {
-            registry.Add(dependencies.SelectMany(GetAllDependedExtensions).Concat(GetAllGeneratedExtensions(generatedInfo)).ToArray());
+            registry.AddRange(dependencies.SelectMany(GetAllDependedExtensions).Concat(GetAllGeneratedExtensions(generatedInfo)).ToArray());
         }
 
         private static IEnumerable<Extension> GetAllGeneratedExtensions(GeneratedClrTypeInfo generated)

+ 1 - 1
java/bom/pom.xml

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

+ 1 - 1
java/core/pom.xml

@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.google.protobuf</groupId>
     <artifactId>protobuf-parent</artifactId>
-    <version>3.9.0-rc-1</version>
+    <version>3.9.1</version>
   </parent>
 
   <artifactId>protobuf-java</artifactId>

+ 1 - 1
java/lite/pom.xml

@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.google.protobuf</groupId>
     <artifactId>protobuf-parent</artifactId>
-    <version>3.9.0-rc-1</version>
+    <version>3.9.1</version>
   </parent>
 
   <artifactId>protobuf-javalite</artifactId>

+ 8 - 2
java/pom.xml

@@ -4,7 +4,7 @@
 
   <groupId>com.google.protobuf</groupId>
   <artifactId>protobuf-parent</artifactId>
-  <version>3.9.0-rc-1</version>
+  <version>3.9.1</version>
   <packaging>pom</packaging>
 
   <name>Protocol Buffers [Parent]</name>
@@ -142,6 +142,9 @@
               <goals>
                 <goal>jar</goal>
               </goals>
+              <configuration>
+                <failOnError>false</failOnError>
+              </configuration>
             </execution>
           </executions>
         </plugin>
@@ -188,13 +191,16 @@
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-javadoc-plugin</artifactId>
-            <version>2.9.1</version>
+            <version>2.10.3</version>
             <executions>
               <execution>
                 <id>attach-javadocs</id>
                 <goals>
                   <goal>jar</goal>
                 </goals>
+                <configuration>
+                  <failOnError>false</failOnError>
+                </configuration>
               </execution>
             </executions>
           </plugin>

+ 1 - 1
java/util/pom.xml

@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.google.protobuf</groupId>
     <artifactId>protobuf-parent</artifactId>
-    <version>3.9.0-rc-1</version>
+    <version>3.9.1</version>
   </parent>
 
   <artifactId>protobuf-java-util</artifactId>

+ 1 - 1
js/package.json

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

+ 3 - 0
php/ext/google/protobuf/message.c

@@ -471,11 +471,14 @@ void Message_construct(zval* msg, zval* array_wrapper) {
       if (upb_fielddef_containingoneof(field)) {
         void* memory = slot_memory(intern->descriptor->layout,
                                    message_data(intern), field);
+        uint32_t* oneof_case = slot_oneof_case(intern->descriptor->layout,
+                                               message_data(intern), field);
         int property_cache_index =
             intern->descriptor->layout->fields[upb_fielddef_index(field)]
                 .cache_index;
         cached = OBJ_PROP(Z_OBJ_P(msg), property_cache_index);
         *(CACHED_VALUE**)(memory) = cached;
+        *oneof_case = upb_fielddef_number(field);
       } else {
         zend_property_info* property_info;
         PHP_PROTO_FAKE_SCOPE_BEGIN(Z_OBJCE_P(msg));

+ 34 - 6
php/ext/google/protobuf/package.xml

@@ -10,15 +10,15 @@
   <email>protobuf-opensource@google.com</email>
   <active>yes</active>
  </lead>
- <date>2019-06-17</date>
- <time>09:34:50</time>
+ <date>2019-08-02</date>
+ <time>15:59:08</time>
  <version>
-  <release>3.9.0RC1</release>
-  <api>3.9.0</api>
+  <release>3.9.1</release>
+  <api>3.9.1</api>
  </version>
  <stability>
-  <release>beta</release>
-  <api>beta</api>
+  <release>stable</release>
+  <api>stable</api>
  </stability>
  <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license>
  <notes>GA release.</notes>
@@ -361,5 +361,33 @@ 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.9.0</release>
+    <api>3.9.0</api>
+   </version>
+   <stability>
+    <release>stable</release>
+    <api>stable</api>
+   </stability>
+   <date>2019-07-10</date>
+   <time>16:50:08</time>
+   <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license>
+   <notes>GA release.</notes>
+  </release>
+  <release>
+   <version>
+    <release>3.9.1</release>
+    <api>3.9.1</api>
+   </version>
+   <stability>
+    <release>stable</release>
+    <api>stable</api>
+   </stability>
+   <date>2019-08-02</date>
+   <time>15:59:08</time>
+   <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license>
+   <notes>GA release.</notes>
+  </release>
  </changelog>
 </package>

+ 3 - 1
php/ext/google/protobuf/protobuf.h

@@ -37,7 +37,7 @@
 #include "upb.h"
 
 #define PHP_PROTOBUF_EXTNAME "protobuf"
-#define PHP_PROTOBUF_VERSION "3.9.0RC1"
+#define PHP_PROTOBUF_VERSION "3.9.1"
 
 #define MAX_LENGTH_OF_INT64 20
 #define SIZEOF_INT64 8
@@ -948,6 +948,8 @@ void layout_merge(MessageLayout* layout, MessageHeader* from,
 const char* layout_get_oneof_case(MessageLayout* layout, const void* storage,
                                   const upb_oneofdef* oneof TSRMLS_DC);
 void free_layout(MessageLayout* layout);
+uint32_t* slot_oneof_case(MessageLayout* layout, const void* storage,
+                          const upb_fielddef* field);
 void* slot_memory(MessageLayout* layout, const void* storage,
                   const upb_fielddef* field);
 

+ 2 - 2
php/ext/google/protobuf/storage.c

@@ -572,8 +572,8 @@ static size_t align_up_to(size_t offset, size_t granularity) {
   return (offset + granularity - 1) & ~(granularity - 1);
 }
 
-static uint32_t* slot_oneof_case(MessageLayout* layout, const void* storage,
-                                 const upb_fielddef* field) {
+uint32_t* slot_oneof_case(MessageLayout* layout, const void* storage,
+                          const upb_fielddef* field) {
   return (uint32_t*)(((uint8_t*)storage) +
                      layout->fields[upb_fielddef_index(field)].case_offset);
 }

+ 1 - 1
php/src/Google/Protobuf/Internal/DescriptorProto.php

@@ -15,7 +15,7 @@ use Google\Protobuf\Internal\GPBUtil;
  *
  * Generated from protobuf message <code>google.protobuf.DescriptorProto</code>
  */
-final class DescriptorProto extends \Google\Protobuf\Internal\Message
+class DescriptorProto extends \Google\Protobuf\Internal\Message
 {
     /**
      * Generated from protobuf field <code>optional string name = 1;</code>

+ 1 - 1
php/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php

@@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
 /**
  * Generated from protobuf message <code>google.protobuf.DescriptorProto.ExtensionRange</code>
  */
-final class ExtensionRange extends \Google\Protobuf\Internal\Message
+class ExtensionRange extends \Google\Protobuf\Internal\Message
 {
     /**
      * Inclusive.

+ 1 - 1
php/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php

@@ -17,7 +17,7 @@ use Google\Protobuf\Internal\GPBUtil;
  *
  * Generated from protobuf message <code>google.protobuf.DescriptorProto.ReservedRange</code>
  */
-final class ReservedRange extends \Google\Protobuf\Internal\Message
+class ReservedRange extends \Google\Protobuf\Internal\Message
 {
     /**
      * Inclusive.

+ 1 - 1
php/src/Google/Protobuf/Internal/EnumDescriptorProto.php

@@ -15,7 +15,7 @@ use Google\Protobuf\Internal\GPBUtil;
  *
  * Generated from protobuf message <code>google.protobuf.EnumDescriptorProto</code>
  */
-final class EnumDescriptorProto extends \Google\Protobuf\Internal\Message
+class EnumDescriptorProto extends \Google\Protobuf\Internal\Message
 {
     /**
      * Generated from protobuf field <code>optional string name = 1;</code>

+ 1 - 1
php/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php

@@ -19,7 +19,7 @@ use Google\Protobuf\Internal\GPBUtil;
  *
  * Generated from protobuf message <code>google.protobuf.EnumDescriptorProto.EnumReservedRange</code>
  */
-final class EnumReservedRange extends \Google\Protobuf\Internal\Message
+class EnumReservedRange extends \Google\Protobuf\Internal\Message
 {
     /**
      * Inclusive.

+ 1 - 1
php/src/Google/Protobuf/Internal/EnumOptions.php

@@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
 /**
  * Generated from protobuf message <code>google.protobuf.EnumOptions</code>
  */
-final class EnumOptions extends \Google\Protobuf\Internal\Message
+class EnumOptions extends \Google\Protobuf\Internal\Message
 {
     /**
      * Set this option to true to allow mapping different tag names to the same

+ 1 - 1
php/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php

@@ -15,7 +15,7 @@ use Google\Protobuf\Internal\GPBUtil;
  *
  * Generated from protobuf message <code>google.protobuf.EnumValueDescriptorProto</code>
  */
-final class EnumValueDescriptorProto extends \Google\Protobuf\Internal\Message
+class EnumValueDescriptorProto extends \Google\Protobuf\Internal\Message
 {
     /**
      * Generated from protobuf field <code>optional string name = 1;</code>

+ 1 - 1
php/src/Google/Protobuf/Internal/EnumValueOptions.php

@@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
 /**
  * Generated from protobuf message <code>google.protobuf.EnumValueOptions</code>
  */
-final class EnumValueOptions extends \Google\Protobuf\Internal\Message
+class EnumValueOptions extends \Google\Protobuf\Internal\Message
 {
     /**
      * Is this enum value deprecated?

+ 1 - 1
php/src/Google/Protobuf/Internal/ExtensionRangeOptions.php

@@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
 /**
  * Generated from protobuf message <code>google.protobuf.ExtensionRangeOptions</code>
  */
-final class ExtensionRangeOptions extends \Google\Protobuf\Internal\Message
+class ExtensionRangeOptions extends \Google\Protobuf\Internal\Message
 {
     /**
      * The parser stores options it doesn't recognize here. See above.

+ 1 - 1
php/src/Google/Protobuf/Internal/FieldDescriptorProto.php

@@ -15,7 +15,7 @@ use Google\Protobuf\Internal\GPBUtil;
  *
  * Generated from protobuf message <code>google.protobuf.FieldDescriptorProto</code>
  */
-final class FieldDescriptorProto extends \Google\Protobuf\Internal\Message
+class FieldDescriptorProto extends \Google\Protobuf\Internal\Message
 {
     /**
      * Generated from protobuf field <code>optional string name = 1;</code>

+ 1 - 1
php/src/Google/Protobuf/Internal/FieldOptions.php

@@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
 /**
  * Generated from protobuf message <code>google.protobuf.FieldOptions</code>
  */
-final class FieldOptions extends \Google\Protobuf\Internal\Message
+class FieldOptions extends \Google\Protobuf\Internal\Message
 {
     /**
      * The ctype option instructs the C++ code generator to use a different

+ 1 - 1
php/src/Google/Protobuf/Internal/FileDescriptorProto.php

@@ -15,7 +15,7 @@ use Google\Protobuf\Internal\GPBUtil;
  *
  * Generated from protobuf message <code>google.protobuf.FileDescriptorProto</code>
  */
-final class FileDescriptorProto extends \Google\Protobuf\Internal\Message
+class FileDescriptorProto extends \Google\Protobuf\Internal\Message
 {
     /**
      * file name, relative to root of source tree

+ 1 - 1
php/src/Google/Protobuf/Internal/FileDescriptorSet.php

@@ -16,7 +16,7 @@ use Google\Protobuf\Internal\GPBUtil;
  *
  * Generated from protobuf message <code>google.protobuf.FileDescriptorSet</code>
  */
-final class FileDescriptorSet extends \Google\Protobuf\Internal\Message
+class FileDescriptorSet extends \Google\Protobuf\Internal\Message
 {
     /**
      * Generated from protobuf field <code>repeated .google.protobuf.FileDescriptorProto file = 1;</code>

+ 1 - 1
php/src/Google/Protobuf/Internal/FileOptions.php

@@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
 /**
  * Generated from protobuf message <code>google.protobuf.FileOptions</code>
  */
-final class FileOptions extends \Google\Protobuf\Internal\Message
+class FileOptions extends \Google\Protobuf\Internal\Message
 {
     /**
      * Sets the Java package where classes generated from this .proto will be

+ 1 - 1
php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php

@@ -17,7 +17,7 @@ use Google\Protobuf\Internal\GPBUtil;
  *
  * Generated from protobuf message <code>google.protobuf.GeneratedCodeInfo</code>
  */
-final class GeneratedCodeInfo extends \Google\Protobuf\Internal\Message
+class GeneratedCodeInfo extends \Google\Protobuf\Internal\Message
 {
     /**
      * An Annotation connects some span of text in generated code to an element

+ 1 - 1
php/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php

@@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
 /**
  * Generated from protobuf message <code>google.protobuf.GeneratedCodeInfo.Annotation</code>
  */
-final class Annotation extends \Google\Protobuf\Internal\Message
+class Annotation extends \Google\Protobuf\Internal\Message
 {
     /**
      * Identifies the element in the original source .proto file. This field

+ 1 - 1
php/src/Google/Protobuf/Internal/MessageOptions.php

@@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
 /**
  * Generated from protobuf message <code>google.protobuf.MessageOptions</code>
  */
-final class MessageOptions extends \Google\Protobuf\Internal\Message
+class MessageOptions extends \Google\Protobuf\Internal\Message
 {
     /**
      * Set true to use the old proto1 MessageSet wire format for extensions.

+ 1 - 1
php/src/Google/Protobuf/Internal/MethodDescriptorProto.php

@@ -15,7 +15,7 @@ use Google\Protobuf\Internal\GPBUtil;
  *
  * Generated from protobuf message <code>google.protobuf.MethodDescriptorProto</code>
  */
-final class MethodDescriptorProto extends \Google\Protobuf\Internal\Message
+class MethodDescriptorProto extends \Google\Protobuf\Internal\Message
 {
     /**
      * Generated from protobuf field <code>optional string name = 1;</code>

+ 1 - 1
php/src/Google/Protobuf/Internal/MethodOptions.php

@@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
 /**
  * Generated from protobuf message <code>google.protobuf.MethodOptions</code>
  */
-final class MethodOptions extends \Google\Protobuf\Internal\Message
+class MethodOptions extends \Google\Protobuf\Internal\Message
 {
     /**
      * Is this method deprecated?

+ 1 - 1
php/src/Google/Protobuf/Internal/OneofDescriptorProto.php

@@ -15,7 +15,7 @@ use Google\Protobuf\Internal\GPBUtil;
  *
  * Generated from protobuf message <code>google.protobuf.OneofDescriptorProto</code>
  */
-final class OneofDescriptorProto extends \Google\Protobuf\Internal\Message
+class OneofDescriptorProto extends \Google\Protobuf\Internal\Message
 {
     /**
      * Generated from protobuf field <code>optional string name = 1;</code>

+ 1 - 1
php/src/Google/Protobuf/Internal/OneofOptions.php

@@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
 /**
  * Generated from protobuf message <code>google.protobuf.OneofOptions</code>
  */
-final class OneofOptions extends \Google\Protobuf\Internal\Message
+class OneofOptions extends \Google\Protobuf\Internal\Message
 {
     /**
      * The parser stores options it doesn't recognize here. See above.

+ 1 - 1
php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php

@@ -15,7 +15,7 @@ use Google\Protobuf\Internal\GPBUtil;
  *
  * Generated from protobuf message <code>google.protobuf.ServiceDescriptorProto</code>
  */
-final class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message
+class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message
 {
     /**
      * Generated from protobuf field <code>optional string name = 1;</code>

+ 1 - 1
php/src/Google/Protobuf/Internal/ServiceOptions.php

@@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
 /**
  * Generated from protobuf message <code>google.protobuf.ServiceOptions</code>
  */
-final class ServiceOptions extends \Google\Protobuf\Internal\Message
+class ServiceOptions extends \Google\Protobuf\Internal\Message
 {
     /**
      * Is this service deprecated?

+ 1 - 1
php/src/Google/Protobuf/Internal/SourceCodeInfo.php

@@ -16,7 +16,7 @@ use Google\Protobuf\Internal\GPBUtil;
  *
  * Generated from protobuf message <code>google.protobuf.SourceCodeInfo</code>
  */
-final class SourceCodeInfo extends \Google\Protobuf\Internal\Message
+class SourceCodeInfo extends \Google\Protobuf\Internal\Message
 {
     /**
      * A Location identifies a piece of source code in a .proto file which

+ 1 - 1
php/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php

@@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
 /**
  * Generated from protobuf message <code>google.protobuf.SourceCodeInfo.Location</code>
  */
-final class Location extends \Google\Protobuf\Internal\Message
+class Location extends \Google\Protobuf\Internal\Message
 {
     /**
      * Identifies which part of the FileDescriptorProto was defined at this

+ 1 - 1
php/src/Google/Protobuf/Internal/UninterpretedOption.php

@@ -20,7 +20,7 @@ use Google\Protobuf\Internal\GPBUtil;
  *
  * Generated from protobuf message <code>google.protobuf.UninterpretedOption</code>
  */
-final class UninterpretedOption extends \Google\Protobuf\Internal\Message
+class UninterpretedOption extends \Google\Protobuf\Internal\Message
 {
     /**
      * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>

+ 1 - 1
php/src/Google/Protobuf/Internal/UninterpretedOption/NamePart.php

@@ -19,7 +19,7 @@ use Google\Protobuf\Internal\GPBUtil;
  *
  * Generated from protobuf message <code>google.protobuf.UninterpretedOption.NamePart</code>
  */
-final class NamePart extends \Google\Protobuf\Internal\Message
+class NamePart extends \Google\Protobuf\Internal\Message
 {
     /**
      * Generated from protobuf field <code>required string name_part = 1;</code>

+ 2 - 0
php/tests/generated_class_test.php

@@ -1452,6 +1452,8 @@ class GeneratedClassTest extends TestBase
         $m = new TestMessage([
             'oneof_message' => new Sub(),
         ]);
+        $this->assertSame('oneof_message', $m->getMyOneof());
+        $this->assertNotNull($m->getOneofMessage());
     }
 
     public function testOneofStringInArrayConstructor()

+ 1 - 1
protoc-artifacts/pom.xml

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

+ 1 - 1
python/google/protobuf/__init__.py

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

+ 1 - 1
ruby/google-protobuf.gemspec

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

+ 1 - 1
src/Makefile.am

@@ -18,7 +18,7 @@ else
 PTHREAD_DEF =
 endif
 
-PROTOBUF_VERSION = 20:0:0
+PROTOBUF_VERSION = 20:1:0
 
 if GCC
 # Turn on all warnings except for sign comparison (we ignore sign comparison

+ 1 - 1
src/google/protobuf/any.pb.h

@@ -13,7 +13,7 @@
 #error incompatible with your Protocol Buffer headers. Please update
 #error your headers.
 #endif
-#if 3009000 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009001 < 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.

+ 1 - 1
src/google/protobuf/api.pb.h

@@ -13,7 +13,7 @@
 #error incompatible with your Protocol Buffer headers. Please update
 #error your headers.
 #endif
-#if 3009000 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009001 < 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.

+ 1 - 1
src/google/protobuf/compiler/php/php_generator.cc

@@ -1265,7 +1265,7 @@ void GenerateMessageFile(const FileDescriptor* file, const Descriptor* message,
   }
 
   printer.Print(
-      "final class ^name^ extends \\Google\\Protobuf\\Internal\\Message\n"
+      "class ^name^ extends \\Google\\Protobuf\\Internal\\Message\n"
       "{\n",
       "name", fullname);
   Indent(&printer);

+ 1 - 1
src/google/protobuf/compiler/plugin.pb.h

@@ -13,7 +13,7 @@
 #error incompatible with your Protocol Buffer headers. Please update
 #error your headers.
 #endif
-#if 3009000 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009001 < 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.

+ 1 - 1
src/google/protobuf/descriptor.pb.h

@@ -13,7 +13,7 @@
 #error incompatible with your Protocol Buffer headers. Please update
 #error your headers.
 #endif
-#if 3009000 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009001 < 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.

+ 1 - 1
src/google/protobuf/duration.pb.h

@@ -13,7 +13,7 @@
 #error incompatible with your Protocol Buffer headers. Please update
 #error your headers.
 #endif
-#if 3009000 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009001 < 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.

+ 1 - 1
src/google/protobuf/empty.pb.h

@@ -13,7 +13,7 @@
 #error incompatible with your Protocol Buffer headers. Please update
 #error your headers.
 #endif
-#if 3009000 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009001 < 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.

+ 1 - 1
src/google/protobuf/field_mask.pb.h

@@ -13,7 +13,7 @@
 #error incompatible with your Protocol Buffer headers. Please update
 #error your headers.
 #endif
-#if 3009000 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009001 < 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.

+ 1 - 1
src/google/protobuf/port_def.inc

@@ -288,7 +288,7 @@
 
 // Shared google3/opensource definitions. //////////////////////////////////////
 
-#define PROTOBUF_VERSION 3009000
+#define PROTOBUF_VERSION 3009001
 #define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC 3009000
 #define PROTOBUF_MIN_PROTOC_VERSION 3009000
 #define PROTOBUF_VERSION_SUFFIX ""

+ 1 - 1
src/google/protobuf/source_context.pb.h

@@ -13,7 +13,7 @@
 #error incompatible with your Protocol Buffer headers. Please update
 #error your headers.
 #endif
-#if 3009000 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009001 < 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.

+ 1 - 1
src/google/protobuf/struct.pb.h

@@ -13,7 +13,7 @@
 #error incompatible with your Protocol Buffer headers. Please update
 #error your headers.
 #endif
-#if 3009000 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009001 < 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.

+ 1 - 1
src/google/protobuf/stubs/common.h

@@ -81,7 +81,7 @@ 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 3009000
+#define GOOGLE_PROTOBUF_VERSION 3009001
 
 // A suffix string for alpha, beta or rc releases. Empty for stable releases.
 #define GOOGLE_PROTOBUF_VERSION_SUFFIX ""

+ 1 - 1
src/google/protobuf/timestamp.pb.h

@@ -13,7 +13,7 @@
 #error incompatible with your Protocol Buffer headers. Please update
 #error your headers.
 #endif
-#if 3009000 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009001 < 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.

+ 1 - 1
src/google/protobuf/type.pb.h

@@ -13,7 +13,7 @@
 #error incompatible with your Protocol Buffer headers. Please update
 #error your headers.
 #endif
-#if 3009000 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009001 < 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.

+ 1 - 1
src/google/protobuf/wrappers.pb.h

@@ -13,7 +13,7 @@
 #error incompatible with your Protocol Buffer headers. Please update
 #error your headers.
 #endif
-#if 3009000 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009001 < 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.

+ 1 - 23
update_version.py

@@ -147,31 +147,9 @@ def UpdateCpp():
         '#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION %s' % cpp_version,
         line)
     return line
-  def RewritePbH(line):
-    line = re.sub(
-        r'^#if PROTOBUF_VERSION < .*$',
-        '#if PROTOBUF_VERSION < %s' % cpp_version,
-        line)
-    line = re.sub(
-        r'^#if .* < PROTOBUF_MIN_PROTOC_VERSION$',
-        '#if %s < PROTOBUF_MIN_PROTOC_VERSION' % cpp_version,
-        line)
-    return line
-    
+
   RewriteTextFile('src/google/protobuf/stubs/common.h', RewriteCommon)
   RewriteTextFile('src/google/protobuf/port_def.inc', RewritePortDef)
-  RewriteTextFile('src/google/protobuf/any.pb.h', RewritePbH)
-  RewriteTextFile('src/google/protobuf/api.pb.h', RewritePbH)
-  RewriteTextFile('src/google/protobuf/descriptor.pb.h', RewritePbH)
-  RewriteTextFile('src/google/protobuf/duration.pb.h', RewritePbH)
-  RewriteTextFile('src/google/protobuf/empty.pb.h', RewritePbH)
-  RewriteTextFile('src/google/protobuf/field_mask.pb.h', RewritePbH)
-  RewriteTextFile('src/google/protobuf/source_context.pb.h', RewritePbH)
-  RewriteTextFile('src/google/protobuf/struct.pb.h', RewritePbH)
-  RewriteTextFile('src/google/protobuf/timestamp.pb.h', RewritePbH)
-  RewriteTextFile('src/google/protobuf/type.pb.h', RewritePbH)
-  RewriteTextFile('src/google/protobuf/wrappers.pb.h', RewritePbH)
-  RewriteTextFile('src/google/protobuf/compiler/plugin.pb.h', RewritePbH)
 
 
 def UpdateCsharp():

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä