From c3093d3ee5f1d8e6264b3858d0ae44feddbf23c0 Mon Sep 17 00:00:00 2001 From: Chris Nix Date: Thu, 4 May 2017 09:50:37 +0100 Subject: Fix issue 3046: compilation on alpine 3.5 --- src/google/protobuf/compiler/mock_code_generator.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/google/protobuf/compiler/mock_code_generator.cc b/src/google/protobuf/compiler/mock_code_generator.cc index 0ddb99e5..8b7a6146 100644 --- a/src/google/protobuf/compiler/mock_code_generator.cc +++ b/src/google/protobuf/compiler/mock_code_generator.cc @@ -55,6 +55,13 @@ #include #include +#ifdef major +#undef major +#endif +#ifdef minor +#undef minor +#endif + namespace google { namespace protobuf { namespace compiler { -- cgit v1.2.3 From 22c8772e21be4b1bf9722e44164ed2e93f18a9b9 Mon Sep 17 00:00:00 2001 From: Paul Jolly Date: Sun, 19 Mar 2017 13:51:20 +0000 Subject: Fix #1562 by using goog.crypt.byteArrayToString instead of String.fromCharCode.apply --- js/binary/decoder.js | 2 +- js/binary/utils.js | 2 +- js/binary/utils_test.js | 24 ++++++++++++------------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/js/binary/decoder.js b/js/binary/decoder.js index ad9cb01b..6db28e7c 100644 --- a/js/binary/decoder.js +++ b/js/binary/decoder.js @@ -994,7 +994,7 @@ jspb.BinaryDecoder.prototype.readString = function(length) { codeUnits.length = 0; } } - result += String.fromCharCode.apply(null, codeUnits); + result += goog.crypt.byteArrayToString(codeUnits); this.cursor_ = cursor; return result; }; diff --git a/js/binary/utils.js b/js/binary/utils.js index 7702020b..df16249e 100644 --- a/js/binary/utils.js +++ b/js/binary/utils.js @@ -613,7 +613,7 @@ jspb.utils.decimalStringToHash64 = function(dec) { muladd(1, 1); } - return String.fromCharCode.apply(null, resultBytes); + return goog.crypt.byteArrayToString(resultBytes); }; diff --git a/js/binary/utils_test.js b/js/binary/utils_test.js index d27e5ea2..0a2f4f0a 100644 --- a/js/binary/utils_test.js +++ b/js/binary/utils_test.js @@ -205,31 +205,31 @@ describe('binaryUtilsTest', function() { var convert = jspb.utils.decimalStringToHash64; result = convert('0'); - assertEquals(String.fromCharCode.apply(null, + assertEquals(goog.crypt.byteArrayToString( [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]), result); result = convert('-1'); - assertEquals(String.fromCharCode.apply(null, + assertEquals(goog.crypt.byteArrayToString( [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]), result); result = convert('18446744073709551615'); - assertEquals(String.fromCharCode.apply(null, + assertEquals(goog.crypt.byteArrayToString( [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]), result); result = convert('9223372036854775808'); - assertEquals(String.fromCharCode.apply(null, + assertEquals(goog.crypt.byteArrayToString( [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80]), result); result = convert('-9223372036854775808'); - assertEquals(String.fromCharCode.apply(null, + assertEquals(goog.crypt.byteArrayToString( [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80]), result); result = convert('123456789123456789'); - assertEquals(String.fromCharCode.apply(null, + assertEquals(goog.crypt.byteArrayToString( [0x15, 0x5F, 0xD0, 0xAC, 0x4B, 0x9B, 0xB6, 0x01]), result); result = convert('-123456789123456789'); - assertEquals(String.fromCharCode.apply(null, + assertEquals(goog.crypt.byteArrayToString( [0xEB, 0xA0, 0x2F, 0x53, 0xB4, 0x64, 0x49, 0xFE]), result); }); @@ -259,21 +259,21 @@ describe('binaryUtilsTest', function() { var convert = jspb.utils.hexStringToHash64; result = convert('0x0000000000000000'); - assertEquals(String.fromCharCode.apply(null, + assertEquals(goog.crypt.byteArrayToString( [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]), result); result = convert('0xffffffffffffffff'); - assertEquals(String.fromCharCode.apply(null, + assertEquals(goog.crypt.byteArrayToString( [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]), result); // Hex string is big-endian, hash string is little-endian. result = convert('0x123456789ABCDEF0'); - assertEquals(String.fromCharCode.apply(null, + assertEquals(goog.crypt.byteArrayToString( [0xF0, 0xDE, 0xBC, 0x9A, 0x78, 0x56, 0x34, 0x12]), result); // Capitalization should not matter. result = convert('0x0000abcdefABCDEF'); - assertEquals(String.fromCharCode.apply(null, + assertEquals(goog.crypt.byteArrayToString( [0xEF, 0xCD, 0xAB, 0xEF, 0xCD, 0xAB, 0x00, 0x00]), result); }); @@ -643,7 +643,7 @@ describe('binaryUtilsTest', function() { var sourceBytes = new Uint8Array(sourceData); var sourceBuffer = sourceBytes.buffer; var sourceBase64 = goog.crypt.base64.encodeByteArray(sourceData); - var sourceString = String.fromCharCode.apply(null, sourceData); + var sourceString = goog.crypt.byteArrayToString(sourceData); function check(result) { assertEquals(Uint8Array, result.constructor); -- cgit v1.2.3 From 8859c07a35d9c2c02b6565627fbbc87c152cb731 Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Thu, 4 May 2017 15:11:11 -0700 Subject: Add missing files to build files. --- BUILD | 1 + cmake/extract_includes.bat.in | 2 ++ cmake/libprotobuf.cmake | 1 + src/Makefile.am | 1 + src/google/protobuf/generated_message_table_driven.cc | 6 +++--- 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/BUILD b/BUILD index e5662c4d..da152495 100644 --- a/BUILD +++ b/BUILD @@ -128,6 +128,7 @@ cc_library( "src/google/protobuf/extension_set_heavy.cc", "src/google/protobuf/field_mask.pb.cc", "src/google/protobuf/generated_message_reflection.cc", + "src/google/protobuf/generated_message_table_driven.cc", "src/google/protobuf/io/gzip_stream.cc", "src/google/protobuf/io/printer.cc", "src/google/protobuf/io/strtod.cc", diff --git a/cmake/extract_includes.bat.in b/cmake/extract_includes.bat.in index 245e917f..3faf33f5 100644 --- a/cmake/extract_includes.bat.in +++ b/cmake/extract_includes.bat.in @@ -50,6 +50,7 @@ copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\field_mask.pb.h" incl copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_enum_reflection.h" include\google\protobuf\generated_enum_reflection.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_enum_util.h" include\google\protobuf\generated_enum_util.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_message_reflection.h" include\google\protobuf\generated_message_reflection.h +copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_message_table_driven.h" include\google\protobuf\generated_message_table_driven.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_message_util.h" include\google\protobuf\generated_message_util.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\has_bits.h" include\google\protobuf\has_bits.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\coded_stream.h" include\google\protobuf\io\coded_stream.h @@ -70,6 +71,7 @@ copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\map_type_handler.h" i copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\message.h" include\google\protobuf\message.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\message_lite.h" include\google\protobuf\message_lite.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\metadata.h" include\google\protobuf\metadata.h +copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\metadata_lite.h" include\google\protobuf\metadata_lite.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\reflection.h" include\google\protobuf\reflection.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\reflection_ops.h" include\google\protobuf\reflection_ops.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\repeated_field.h" include\google\protobuf\repeated_field.h diff --git a/cmake/libprotobuf.cmake b/cmake/libprotobuf.cmake index 5313d39e..faecf2e6 100644 --- a/cmake/libprotobuf.cmake +++ b/cmake/libprotobuf.cmake @@ -13,6 +13,7 @@ set(libprotobuf_files ${protobuf_source_dir}/src/google/protobuf/extension_set_heavy.cc ${protobuf_source_dir}/src/google/protobuf/field_mask.pb.cc ${protobuf_source_dir}/src/google/protobuf/generated_message_reflection.cc + ${protobuf_source_dir}/src/google/protobuf/generated_message_table_driven.cc ${protobuf_source_dir}/src/google/protobuf/io/gzip_stream.cc ${protobuf_source_dir}/src/google/protobuf/io/printer.cc ${protobuf_source_dir}/src/google/protobuf/io/strtod.cc diff --git a/src/Makefile.am b/src/Makefile.am index bfb875ac..5c19bcdc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -250,6 +250,7 @@ libprotobuf_la_SOURCES = \ google/protobuf/extension_set_heavy.cc \ google/protobuf/field_mask.pb.cc \ google/protobuf/generated_message_reflection.cc \ + google/protobuf/generated_message_table_driven.cc \ google/protobuf/map_field.cc \ google/protobuf/message.cc \ google/protobuf/reflection_internal.h \ diff --git a/src/google/protobuf/generated_message_table_driven.cc b/src/google/protobuf/generated_message_table_driven.cc index e281266d..f8fda9c6 100644 --- a/src/google/protobuf/generated_message_table_driven.cc +++ b/src/google/protobuf/generated_message_table_driven.cc @@ -74,7 +74,7 @@ inline Arena* GetArena(MessageLite* msg, int64 arena_offset) { template inline Type* AddField(MessageLite* msg, int64 offset) { #if LANG_CXX11 - static_assert(std::is_trivially_copy_assignable::value, + static_assert(google::protobuf::internal::has_trivial_copy::value, "Do not assign"); #endif @@ -94,7 +94,7 @@ inline string* AddField(MessageLite* msg, int64 offset) { template inline void AddField(MessageLite* msg, int64 offset, Type value) { #if LANG_CXX11 - static_assert(std::is_trivially_copy_assignable::value, + static_assert(google::protobuf::internal::has_trivial_copy::value, "Do not assign"); #endif *AddField(msg, offset) = value; @@ -118,7 +118,7 @@ template inline void SetField(MessageLite* msg, uint32* has_bits, uint32 has_bit_index, int64 offset, Type value) { #if LANG_CXX11 - static_assert(std::is_trivially_copy_assignable::value, + static_assert(google::protobuf::internal::has_trivial_copy::value, "Do not assign"); #endif *MutableField(msg, has_bits, has_bit_index, offset) = value; -- cgit v1.2.3 From 3a5a0724f300e9c7de98851a0bbaaa4363981486 Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Thu, 4 May 2017 15:24:55 -0700 Subject: Skip C# test in C++ only distribution. --- src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc b/src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc index 4e44b578..5c54270e 100644 --- a/src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc +++ b/src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc @@ -134,6 +134,14 @@ class GenerateAndTest { }; TEST(CsharpBootstrapTest, GeneratedCsharpDescriptorMatches) { + // Skip this whole test if the csharp directory doesn't exist (i.e., a C++11 + // only distribution). + string descriptor_file_name = + "../csharp/src/Google.Protobuf/Reflection/Descriptor.cs"; + if (!File::Exists(TestSourceDir() + "/" + descriptor_file_name)) { + return; + } + MockErrorCollector error_collector; DiskSourceTree source_tree; Importer importer(&source_tree, &error_collector); -- cgit v1.2.3 From 7378ec2bc8da17ba4b1050dbb1ff05425f05537e Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Thu, 4 May 2017 15:27:30 -0700 Subject: Add missing LIBRPOTOC_EXPORT. --- src/google/protobuf/compiler/code_generator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/google/protobuf/compiler/code_generator.h b/src/google/protobuf/compiler/code_generator.h index b917d373..6ea5f18d 100644 --- a/src/google/protobuf/compiler/code_generator.h +++ b/src/google/protobuf/compiler/code_generator.h @@ -162,8 +162,8 @@ typedef GeneratorContext OutputDirectory; // "foo=bar,baz,qux=corge" // parses to the pairs: // ("foo", "bar"), ("baz", ""), ("qux", "corge") -extern void ParseGeneratorParameter(const string&, - std::vector >*); +LIBPROTOC_EXPORT void ParseGeneratorParameter( + const string&, std::vector >*); } // namespace compiler } // namespace protobuf -- cgit v1.2.3 From e82d81a8843c1aa99b3d33f5478ac3b8ad127982 Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Fri, 5 May 2017 22:04:28 +0100 Subject: Fix offset type to match the tables it is used in --- src/google/protobuf/generated_message_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/google/protobuf/generated_message_util.h b/src/google/protobuf/generated_message_util.h index 44174466..299d95b6 100644 --- a/src/google/protobuf/generated_message_util.h +++ b/src/google/protobuf/generated_message_util.h @@ -100,7 +100,7 @@ namespace internal { // choose 16 rather than some other number just in case the compiler would // be confused by an unaligned pointer. #define GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TYPE, FIELD) \ - static_cast( \ + static_cast<::google::protobuf::uint32>( \ reinterpret_cast( \ &reinterpret_cast(16)->FIELD) - \ reinterpret_cast(16)) -- cgit v1.2.3 From e062f70c6d2e981686caa39e44701f7aaa6c66ed Mon Sep 17 00:00:00 2001 From: randomguy3 Date: Sat, 6 May 2017 09:08:44 +0100 Subject: Fix compilation <: is a digraph, so a space is necessary for compilation on certain compilers. --- src/google/protobuf/generated_message_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/google/protobuf/generated_message_util.h b/src/google/protobuf/generated_message_util.h index 299d95b6..b9654ece 100644 --- a/src/google/protobuf/generated_message_util.h +++ b/src/google/protobuf/generated_message_util.h @@ -100,7 +100,7 @@ namespace internal { // choose 16 rather than some other number just in case the compiler would // be confused by an unaligned pointer. #define GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TYPE, FIELD) \ - static_cast<::google::protobuf::uint32>( \ + static_cast< ::google::protobuf::uint32>( \ reinterpret_cast( \ &reinterpret_cast(16)->FIELD) - \ reinterpret_cast(16)) -- cgit v1.2.3 From 9b82fce7f1a5c7ce067866f06136e45fe9518cb2 Mon Sep 17 00:00:00 2001 From: "Mario J. Rugiero" Date: Fri, 5 May 2017 13:52:58 -0300 Subject: Workaround gcc < 4.5.0 bug See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=189 Signed-off-by: Mario J. Rugiero --- src/google/protobuf/metadata_lite.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/google/protobuf/metadata_lite.h b/src/google/protobuf/metadata_lite.h index 840c02e8..64fde0c6 100644 --- a/src/google/protobuf/metadata_lite.h +++ b/src/google/protobuf/metadata_lite.h @@ -167,7 +167,8 @@ class InternalMetadataWithArenaLite InternalMetadataWithArenaLite() {} explicit InternalMetadataWithArenaLite(Arena* arena) - : InternalMetadataWithArenaBase(arena) {} + : InternalMetadataWithArenaBase(arena) {} void DoSwap(string* other) { mutable_unknown_fields()->swap(*other); -- cgit v1.2.3 From 58538ea91979faa4f8b9841238c53a2276dd3856 Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Mon, 8 May 2017 16:02:08 -0700 Subject: Update version number to 3.3.1 --- Protobuf.podspec | 2 +- configure.ac | 2 +- csharp/Google.Protobuf.Tools.nuspec | 2 +- csharp/src/Google.Protobuf/project.json | 2 +- java/core/pom.xml | 2 +- java/pom.xml | 2 +- java/util/pom.xml | 2 +- js/package.json | 2 +- php/ext/google/protobuf/package.xml | 18 +++++++++++++++++- php/ext/google/protobuf/protobuf.h | 2 +- protoc-artifacts/pom.xml | 2 +- python/google/protobuf/__init__.py | 2 +- ruby/google-protobuf.gemspec | 2 +- src/Makefile.am | 6 +++--- src/google/protobuf/stubs/common.h | 2 +- 15 files changed, 33 insertions(+), 17 deletions(-) diff --git a/Protobuf.podspec b/Protobuf.podspec index 649f3ae3..ffaf7a72 100644 --- a/Protobuf.podspec +++ b/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.3.0' + s.version = '3.3.1' s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.' s.homepage = 'https://github.com/google/protobuf' s.license = '3-Clause BSD License' diff --git a/configure.ac b/configure.ac index 82b221e8..e06ebe5f 100644 --- a/configure.ac +++ b/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.3.0],[protobuf@googlegroups.com],[protobuf]) +AC_INIT([Protocol Buffers],[3.3.1],[protobuf@googlegroups.com],[protobuf]) AM_MAINTAINER_MODE([enable]) diff --git a/csharp/Google.Protobuf.Tools.nuspec b/csharp/Google.Protobuf.Tools.nuspec index 182309bf..18a03f59 100644 --- a/csharp/Google.Protobuf.Tools.nuspec +++ b/csharp/Google.Protobuf.Tools.nuspec @@ -5,7 +5,7 @@ Google Protocol Buffers tools Tools for Protocol Buffers - Google's data interchange format. See project site for more info. - 3.3.0 + 3.3.1 Google Inc. protobuf-packages https://github.com/google/protobuf/blob/master/LICENSE diff --git a/csharp/src/Google.Protobuf/project.json b/csharp/src/Google.Protobuf/project.json index f4376238..6596ddf6 100644 --- a/csharp/src/Google.Protobuf/project.json +++ b/csharp/src/Google.Protobuf/project.json @@ -1,5 +1,5 @@ { - "version": "3.3.0", + "version": "3.3.1", "title": "Google Protocol Buffers", "description": "See project site for more info.", "authors": [ "Google Inc." ], diff --git a/java/core/pom.xml b/java/core/pom.xml index 9c4e1b93..24bc58c7 100644 --- a/java/core/pom.xml +++ b/java/core/pom.xml @@ -6,7 +6,7 @@ com.google.protobuf protobuf-parent - 3.3.0 + 3.3.1 protobuf-java diff --git a/java/pom.xml b/java/pom.xml index 81ffc48a..2c2f4413 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -11,7 +11,7 @@ com.google.protobuf protobuf-parent - 3.3.0 + 3.3.1 pom Protocol Buffers [Parent] diff --git a/java/util/pom.xml b/java/util/pom.xml index c72fa650..8a54e10d 100644 --- a/java/util/pom.xml +++ b/java/util/pom.xml @@ -6,7 +6,7 @@ com.google.protobuf protobuf-parent - 3.3.0 + 3.3.1 protobuf-java-util diff --git a/js/package.json b/js/package.json index 14f54b8b..b7343cc3 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "google-protobuf", - "version": "3.3.0", + "version": "3.3.1", "description": "Protocol Buffers for JavaScript", "main": "google-protobuf.js", "files": [ diff --git a/php/ext/google/protobuf/package.xml b/php/ext/google/protobuf/package.xml index a2a8e066..7bbc2792 100644 --- a/php/ext/google/protobuf/package.xml +++ b/php/ext/google/protobuf/package.xml @@ -13,7 +13,7 @@ 2017-01-13 - 3.3.0 + 3.3.1 3.3.0 @@ -100,6 +100,22 @@ Second alpha release. 3-Clause BSD License +GA release. + + + + + 3.3.1 + 3.3.0 + + + stable + stable + + 2017-05-08 + + 3-Clause BSD License + GA release. diff --git a/php/ext/google/protobuf/protobuf.h b/php/ext/google/protobuf/protobuf.h index e6d42eba..c3374af3 100644 --- a/php/ext/google/protobuf/protobuf.h +++ b/php/ext/google/protobuf/protobuf.h @@ -37,7 +37,7 @@ #include "upb.h" #define PHP_PROTOBUF_EXTNAME "protobuf" -#define PHP_PROTOBUF_VERSION "3.3.0" +#define PHP_PROTOBUF_VERSION "3.3.1" #define MAX_LENGTH_OF_INT64 20 #define SIZEOF_INT64 8 diff --git a/protoc-artifacts/pom.xml b/protoc-artifacts/pom.xml index a06c9998..eeb2987f 100644 --- a/protoc-artifacts/pom.xml +++ b/protoc-artifacts/pom.xml @@ -10,7 +10,7 @@ com.google.protobuf protoc - 3.3.0 + 3.3.1 pom Protobuf Compiler diff --git a/python/google/protobuf/__init__.py b/python/google/protobuf/__init__.py index 0375d72d..8628edd7 100755 --- a/python/google/protobuf/__init__.py +++ b/python/google/protobuf/__init__.py @@ -30,7 +30,7 @@ # Copyright 2007 Google Inc. All Rights Reserved. -__version__ = '3.3.0' +__version__ = '3.3.1' if __name__ != '__main__': try: diff --git a/ruby/google-protobuf.gemspec b/ruby/google-protobuf.gemspec index 836b1dd2..8aff7bf0 100644 --- a/ruby/google-protobuf.gemspec +++ b/ruby/google-protobuf.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = "google-protobuf" - s.version = "3.3.0" + s.version = "3.3.1" s.licenses = ["BSD-3-Clause"] s.summary = "Protocol Buffers" s.description = "Protocol Buffers are Google's data interchange format." diff --git a/src/Makefile.am b/src/Makefile.am index 5c19bcdc..4524aeb2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -184,7 +184,7 @@ nobase_include_HEADERS = \ lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS) -libprotobuf_lite_la_LDFLAGS = -version-info 13:0:0 -export-dynamic -no-undefined +libprotobuf_lite_la_LDFLAGS = -version-info 13:1:0 -export-dynamic -no-undefined if HAVE_LD_VERSION_SCRIPT libprotobuf_lite_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf-lite.map EXTRA_libprotobuf_lite_la_DEPENDENCIES = libprotobuf-lite.map @@ -229,7 +229,7 @@ libprotobuf_lite_la_SOURCES = \ google/protobuf/io/zero_copy_stream_impl_lite.cc libprotobuf_la_LIBADD = $(PTHREAD_LIBS) -libprotobuf_la_LDFLAGS = -version-info 13:0:0 -export-dynamic -no-undefined +libprotobuf_la_LDFLAGS = -version-info 13:1:0 -export-dynamic -no-undefined if HAVE_LD_VERSION_SCRIPT libprotobuf_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf.map EXTRA_libprotobuf_la_DEPENDENCIES = libprotobuf.map @@ -319,7 +319,7 @@ libprotobuf_la_SOURCES = \ nodist_libprotobuf_la_SOURCES = $(nodist_libprotobuf_lite_la_SOURCES) libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la -libprotoc_la_LDFLAGS = -version-info 13:0:0 -export-dynamic -no-undefined +libprotoc_la_LDFLAGS = -version-info 13:1:0 -export-dynamic -no-undefined if HAVE_LD_VERSION_SCRIPT libprotoc_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotoc.map EXTRA_libprotoc_la_DEPENDENCIES = libprotoc.map diff --git a/src/google/protobuf/stubs/common.h b/src/google/protobuf/stubs/common.h index 35fdf96b..15321ebe 100644 --- a/src/google/protobuf/stubs/common.h +++ b/src/google/protobuf/stubs/common.h @@ -96,7 +96,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 3003000 +#define GOOGLE_PROTOBUF_VERSION 3003001 // A suffix string for alpha, beta or rc releases. Empty for stable releases. #define GOOGLE_PROTOBUF_VERSION_SUFFIX "" -- cgit v1.2.3 From 757cc9f9dadf370b3ff075a047a3f9a1ce18356b Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Mon, 8 May 2017 16:58:13 -0700 Subject: Update C++ generated code. --- src/google/protobuf/any.pb.h | 2 +- src/google/protobuf/api.pb.h | 2 +- src/google/protobuf/compiler/plugin.pb.h | 2 +- src/google/protobuf/compiler/profile.pb.h | 2 +- src/google/protobuf/descriptor.pb.h | 2 +- src/google/protobuf/duration.pb.h | 2 +- src/google/protobuf/empty.pb.h | 2 +- src/google/protobuf/field_mask.pb.h | 2 +- src/google/protobuf/source_context.pb.h | 2 +- src/google/protobuf/struct.pb.h | 2 +- src/google/protobuf/timestamp.pb.h | 2 +- src/google/protobuf/type.pb.h | 2 +- src/google/protobuf/wrappers.pb.h | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/google/protobuf/any.pb.h b/src/google/protobuf/any.pb.h index bc05fb35..ef366798 100644 --- a/src/google/protobuf/any.pb.h +++ b/src/google/protobuf/any.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003001 < GOOGLE_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. diff --git a/src/google/protobuf/api.pb.h b/src/google/protobuf/api.pb.h index 108c63a4..36bf43c7 100644 --- a/src/google/protobuf/api.pb.h +++ b/src/google/protobuf/api.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003001 < GOOGLE_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. diff --git a/src/google/protobuf/compiler/plugin.pb.h b/src/google/protobuf/compiler/plugin.pb.h index 4f8befb6..84343688 100644 --- a/src/google/protobuf/compiler/plugin.pb.h +++ b/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 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003001 < GOOGLE_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. diff --git a/src/google/protobuf/compiler/profile.pb.h b/src/google/protobuf/compiler/profile.pb.h index d20b87ed..0b023eb0 100644 --- a/src/google/protobuf/compiler/profile.pb.h +++ b/src/google/protobuf/compiler/profile.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003001 < GOOGLE_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. diff --git a/src/google/protobuf/descriptor.pb.h b/src/google/protobuf/descriptor.pb.h index d1ed2b1f..ef77e6eb 100644 --- a/src/google/protobuf/descriptor.pb.h +++ b/src/google/protobuf/descriptor.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003001 < GOOGLE_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. diff --git a/src/google/protobuf/duration.pb.h b/src/google/protobuf/duration.pb.h index 34873d97..d9cd405d 100644 --- a/src/google/protobuf/duration.pb.h +++ b/src/google/protobuf/duration.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003001 < GOOGLE_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. diff --git a/src/google/protobuf/empty.pb.h b/src/google/protobuf/empty.pb.h index f28dc19b..c318cceb 100644 --- a/src/google/protobuf/empty.pb.h +++ b/src/google/protobuf/empty.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003001 < GOOGLE_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. diff --git a/src/google/protobuf/field_mask.pb.h b/src/google/protobuf/field_mask.pb.h index 742c1cf9..c63cbad7 100644 --- a/src/google/protobuf/field_mask.pb.h +++ b/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 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003001 < GOOGLE_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. diff --git a/src/google/protobuf/source_context.pb.h b/src/google/protobuf/source_context.pb.h index 23cd7f3e..1c72780c 100644 --- a/src/google/protobuf/source_context.pb.h +++ b/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 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003001 < GOOGLE_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. diff --git a/src/google/protobuf/struct.pb.h b/src/google/protobuf/struct.pb.h index a37a5652..3f2d8bc0 100644 --- a/src/google/protobuf/struct.pb.h +++ b/src/google/protobuf/struct.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003001 < GOOGLE_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. diff --git a/src/google/protobuf/timestamp.pb.h b/src/google/protobuf/timestamp.pb.h index 98478540..abc997eb 100644 --- a/src/google/protobuf/timestamp.pb.h +++ b/src/google/protobuf/timestamp.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003001 < GOOGLE_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. diff --git a/src/google/protobuf/type.pb.h b/src/google/protobuf/type.pb.h index c1cd4164..6e3d997a 100644 --- a/src/google/protobuf/type.pb.h +++ b/src/google/protobuf/type.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003001 < GOOGLE_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. diff --git a/src/google/protobuf/wrappers.pb.h b/src/google/protobuf/wrappers.pb.h index 4202541b..9a91be3d 100644 --- a/src/google/protobuf/wrappers.pb.h +++ b/src/google/protobuf/wrappers.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003001 < GOOGLE_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. -- cgit v1.2.3 From 22319315df18526277873058f79cf69e77d8b4a2 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Wed, 10 May 2017 15:59:59 -0700 Subject: Fix c extension for php7.1. (#3077) --- jenkins/docker/Dockerfile | 15 +++++++++- jenkins/docker32/Dockerfile | 63 ++++++++++++++++++++++++--------------- php/ext/google/protobuf/message.c | 8 +++++ tests.sh | 37 +++++++++++++++++++++++ 4 files changed, 98 insertions(+), 25 deletions(-) diff --git a/jenkins/docker/Dockerfile b/jenkins/docker/Dockerfile index 9c9ee56b..3173afbf 100644 --- a/jenkins/docker/Dockerfile +++ b/jenkins/docker/Dockerfile @@ -164,6 +164,14 @@ RUN cd php-7.0.18 && ./configure --enable-maintainer-zts --prefix=/usr/local/php RUN cd php-7.0.18 && make clean && ./configure --prefix=/usr/local/php-7.0 && \ make && make install && cd .. +RUN wget http://am1.php.net/get/php-7.1.4.tar.bz2/from/this/mirror +RUN mv mirror php-7.1.4.tar.bz2 +RUN tar -xvf php-7.1.4.tar.bz2 +RUN cd php-7.1.4 && ./configure --enable-maintainer-zts --prefix=/usr/local/php-7.1-zts && \ + make && make install && cd .. +RUN cd php-7.1.4 && make clean && ./configure --prefix=/usr/local/php-7.1 && \ + make && make install && cd .. + RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" RUN php composer-setup.php RUN mv composer.phar /usr/bin/composer @@ -190,7 +198,12 @@ RUN cd /tmp && \ ln -sfn /usr/local/php-7.0/bin/php-config /usr/bin/php-config && \ ln -sfn /usr/local/php-7.0/bin/phpize /usr/bin/phpize && \ composer install && \ - mv vendor /usr/local/vendor-7.0 + mv vendor /usr/local/vendor-7.0 && \ + ln -sfn /usr/local/php-7.1/bin/php /usr/bin/php && \ + ln -sfn /usr/local/php-7.1/bin/php-config /usr/bin/php-config && \ + ln -sfn /usr/local/php-7.1/bin/phpize /usr/bin/phpize && \ + composer install && \ + mv vendor /usr/local/vendor-7.1 ################## # Go dependencies. diff --git a/jenkins/docker32/Dockerfile b/jenkins/docker32/Dockerfile index ab3fd957..c6813b07 100644 --- a/jenkins/docker32/Dockerfile +++ b/jenkins/docker32/Dockerfile @@ -57,30 +57,6 @@ RUN apt-get clean && apt-get update && apt-get install -y --force-yes \ ################## # PHP dependencies. -RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" -RUN php composer-setup.php -RUN mv composer.phar /usr/bin/composer -RUN php -r "unlink('composer-setup.php');" -RUN cd /tmp && \ - git clone https://github.com/google/protobuf.git && \ - cd protobuf/php && \ - git reset --hard 6b27c1f981a9a93918e4039f236ead27165a8e91 && \ - ln -sfn /usr/bin/php5.5 /usr/bin/php && \ - ln -sfn /usr/bin/php-config5.5 /usr/bin/php-config && \ - ln -sfn /usr/bin/phpize5.5 /usr/bin/phpize && \ - composer install && \ - mv vendor /usr/local/vendor-5.5 && \ - ln -sfn /usr/bin/php5.6 /usr/bin/php && \ - ln -sfn /usr/bin/php-config5.6 /usr/bin/php-config && \ - ln -sfn /usr/bin/phpize5.6 /usr/bin/phpize && \ - composer install && \ - mv vendor /usr/local/vendor-5.6 && \ - ln -sfn /usr/bin/php7.0 /usr/bin/php && \ - ln -sfn /usr/bin/php-config7.0 /usr/bin/php-config && \ - ln -sfn /usr/bin/phpize7.0 /usr/bin/phpize && \ - composer install && \ - mv vendor /usr/local/vendor-7.0 - RUN wget http://am1.php.net/get/php-5.5.38.tar.bz2/from/this/mirror RUN mv mirror php-5.5.38.tar.bz2 RUN tar -xvf php-5.5.38.tar.bz2 @@ -105,6 +81,45 @@ RUN cd php-7.0.18 && ./configure --enable-maintainer-zts --prefix=/usr/local/php RUN cd php-7.0.18 && make clean && ./configure --enable-bcmath --prefix=/usr/local/php-7.0 && \ make && make install && cd .. +RUN wget http://am1.php.net/get/php-7.1.4.tar.bz2/from/this/mirror +RUN mv mirror php-7.1.4.tar.bz2 +RUN tar -xvf php-7.1.4.tar.bz2 +RUN cd php-7.1.4 && ./configure --enable-maintainer-zts --prefix=/usr/local/php-7.1-zts && \ + make && make install && cd .. +RUN cd php-7.1.4 && make clean && ./configure --enable-bcmath --prefix=/usr/local/php-7.1 && \ + make && make install && cd .. + +RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" +RUN php composer-setup.php +RUN mv composer.phar /usr/bin/composer +RUN php -r "unlink('composer-setup.php');" +RUN composer config -g -- disable-tls true +RUN composer config -g -- secure-http false +RUN cd /tmp && \ + git clone https://github.com/google/protobuf.git && \ + cd protobuf/php && \ + git reset --hard 6b27c1f981a9a93918e4039f236ead27165a8e91 && \ + ln -sfn /usr/local/php-5.5/bin/php /usr/bin/php && \ + ln -sfn /usr/local/php-5.5/bin/php-config /usr/bin/php-config && \ + ln -sfn /usr/local/php-5.5/bin/phpize /usr/bin/phpize && \ + composer install && \ + mv vendor /usr/local/vendor-5.5 && \ + ln -sfn /usr/local/php-5.6/bin/php /usr/bin/php && \ + ln -sfn /usr/local/php-5.6/bin/php-config /usr/bin/php-config && \ + ln -sfn /usr/local/php-5.6/bin/phpize /usr/bin/phpize && \ + composer install && \ + mv vendor /usr/local/vendor-5.6 && \ + ln -sfn /usr/local/php-7.0/bin/php /usr/bin/php && \ + ln -sfn /usr/local/php-7.0/bin/php-config /usr/bin/php-config && \ + ln -sfn /usr/local/php-7.0/bin/phpize /usr/bin/phpize && \ + composer install && \ + mv vendor /usr/local/vendor-7.0 && \ + ln -sfn /usr/local/php-7.1/bin/php /usr/bin/php && \ + ln -sfn /usr/local/php-7.1/bin/php-config /usr/bin/php-config && \ + ln -sfn /usr/local/php-7.1/bin/phpize /usr/bin/phpize && \ + composer install && \ + mv vendor /usr/local/vendor-7.1 + ################## # Python dependencies diff --git a/php/ext/google/protobuf/message.c b/php/ext/google/protobuf/message.c index cabc3987..48b87b10 100644 --- a/php/ext/google/protobuf/message.c +++ b/php/ext/google/protobuf/message.c @@ -116,7 +116,11 @@ static void message_set_property(zval* object, zval* member, zval* value, return; } +#if PHP_MAJOR_VERSION < 7 || (PHP_MAJOR_VERSION == 7 && PHP_MINOR_VERSION == 0) if (Z_OBJCE_P(object) != EG(scope)) { +#else + if (Z_OBJCE_P(object) != zend_get_executed_scope()) { +#endif // User cannot set property directly (e.g., $m->a = 1) zend_error(E_USER_ERROR, "Cannot access private property."); return; @@ -146,7 +150,11 @@ static zval* message_get_property(zval* object, zval* member, int type, return PHP_PROTO_GLOBAL_UNINITIALIZED_ZVAL; } +#if PHP_MAJOR_VERSION < 7 || (PHP_MAJOR_VERSION == 7 && PHP_MINOR_VERSION == 0) if (Z_OBJCE_P(object) != EG(scope)) { +#else + if (Z_OBJCE_P(object) != zend_get_executed_scope()) { +#endif // User cannot get property directly (e.g., $a = $m->a) zend_error(E_USER_ERROR, "Cannot access private property."); return PHP_PROTO_GLOBAL_UNINITIALIZED_ZVAL; diff --git a/tests.sh b/tests.sh index edb37da7..6dc277df 100755 --- a/tests.sh +++ b/tests.sh @@ -545,16 +545,51 @@ build_php7.0_mac() { popd } +build_php7.1() { + use_php 7.1 + pushd php + rm -rf vendor + cp -r /usr/local/vendor-7.1 vendor + wget https://phar.phpunit.de/phpunit-5.6.0.phar -O /usr/bin/phpunit + phpunit + popd + pushd conformance + # TODO(teboring): Add it back + # make test_php + popd +} + +build_php7.1_c() { + use_php 7.1 + wget https://phar.phpunit.de/phpunit-5.6.0.phar -O /usr/bin/phpunit + cd php/tests && /bin/bash ./test.sh && cd ../.. + pushd conformance + # make test_php_c + popd +} + +build_php7.1_zts_c() { + use_php_zts 7.1 + wget https://phar.phpunit.de/phpunit-5.6.0.phar -O /usr/bin/phpunit + cd php/tests && /bin/bash ./test.sh && cd ../.. + pushd conformance + # make test_php_c + popd +} + build_php_all() { build_php5.5 build_php5.6 build_php7.0 + build_php7.1 build_php5.5_c build_php5.6_c build_php7.0_c + build_php7.1_c build_php5.5_zts_c build_php5.6_zts_c build_php7.0_zts_c + build_php7.1_zts_c } # Note: travis currently does not support testing more than one language so the @@ -595,6 +630,8 @@ Usage: $0 { cpp | php5.6_c | php7.0 | php7.0_c | + php7.1 | + php7.1_c | php_all) " exit 1 -- cgit v1.2.3 From de6ae7d4ebea9bf15ab3ca139a00c975826450bf Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Thu, 11 May 2017 13:56:05 -0700 Subject: Fix upb load descriptor when no messages defined in prorto. (#3080) --- php/ext/google/protobuf/upb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/php/ext/google/protobuf/upb.c b/php/ext/google/protobuf/upb.c index 70983016..760848e8 100644 --- a/php/ext/google/protobuf/upb.c +++ b/php/ext/google/protobuf/upb.c @@ -2290,6 +2290,9 @@ bool upb_symtab_addfile(upb_symtab *s, upb_filedef *file, upb_status *status) { bool ret; n = upb_filedef_defcount(file); + if (n == 0) { + return true; + } defs = upb_gmalloc(sizeof(*defs) * n); if (defs == NULL) { -- cgit v1.2.3 From 474cca52a3fb063c71b22d7440933cee3f2f5417 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Thu, 11 May 2017 14:52:50 -0700 Subject: Add LICENSE in package.xml (#3083) --- php/ext/google/protobuf/package.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/php/ext/google/protobuf/package.xml b/php/ext/google/protobuf/package.xml index 7bbc2792..2c405aa9 100644 --- a/php/ext/google/protobuf/package.xml +++ b/php/ext/google/protobuf/package.xml @@ -40,6 +40,7 @@ GA release. + -- cgit v1.2.3 From 26f00119f2dd90a81cd54c57acfcc444b65102e8 Mon Sep 17 00:00:00 2001 From: Steven Peters Date: Thu, 11 May 2017 15:24:58 -0700 Subject: Use bool deterministic to suppress warning Fixes #3059 by re-applying 08b1c718 from #3087. --- src/google/protobuf/any.pb.cc | 1 + src/google/protobuf/api.pb.cc | 3 +++ src/google/protobuf/compiler/cpp/cpp_message.cc | 1 + src/google/protobuf/compiler/plugin.pb.cc | 3 +++ src/google/protobuf/descriptor.pb.cc | 25 +++++++++++++++++++++++++ src/google/protobuf/duration.pb.cc | 1 + src/google/protobuf/empty.pb.cc | 1 + src/google/protobuf/field_mask.pb.cc | 1 + src/google/protobuf/source_context.pb.cc | 1 + src/google/protobuf/struct.pb.cc | 3 +++ src/google/protobuf/timestamp.pb.cc | 1 + src/google/protobuf/type.pb.cc | 5 +++++ src/google/protobuf/wrappers.pb.cc | 9 +++++++++ 13 files changed, 55 insertions(+) diff --git a/src/google/protobuf/any.pb.cc b/src/google/protobuf/any.pb.cc index 6c80aaa2..4bcb7125 100644 --- a/src/google/protobuf/any.pb.cc +++ b/src/google/protobuf/any.pb.cc @@ -309,6 +309,7 @@ void Any::SerializeWithCachedSizes( ::google::protobuf::uint8* Any::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Any) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; diff --git a/src/google/protobuf/api.pb.cc b/src/google/protobuf/api.pb.cc index 94c6685f..d1bff52a 100644 --- a/src/google/protobuf/api.pb.cc +++ b/src/google/protobuf/api.pb.cc @@ -482,6 +482,7 @@ void Api::SerializeWithCachedSizes( ::google::protobuf::uint8* Api::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Api) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1244,6 +1245,7 @@ void Method::SerializeWithCachedSizes( ::google::protobuf::uint8* Method::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Method) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1857,6 +1859,7 @@ void Mixin::SerializeWithCachedSizes( ::google::protobuf::uint8* Mixin::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Mixin) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; diff --git a/src/google/protobuf/compiler/cpp/cpp_message.cc b/src/google/protobuf/compiler/cpp/cpp_message.cc index d9524f64..316220c6 100644 --- a/src/google/protobuf/compiler/cpp/cpp_message.cc +++ b/src/google/protobuf/compiler/cpp/cpp_message.cc @@ -3715,6 +3715,7 @@ GenerateSerializeWithCachedSizesToArray(io::Printer* printer) { "classname", classname_); printer->Indent(); + printer->Print("(void)deterministic; // Unused\n"); printer->Print( "// @@protoc_insertion_point(serialize_to_array_start:$full_name$)\n", "full_name", descriptor_->full_name()); diff --git a/src/google/protobuf/compiler/plugin.pb.cc b/src/google/protobuf/compiler/plugin.pb.cc index f7dc1b70..83b035f8 100644 --- a/src/google/protobuf/compiler/plugin.pb.cc +++ b/src/google/protobuf/compiler/plugin.pb.cc @@ -964,6 +964,7 @@ void CodeGeneratorRequest::SerializeWithCachedSizes( ::google::protobuf::uint8* CodeGeneratorRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1573,6 +1574,7 @@ void CodeGeneratorResponse_File::SerializeWithCachedSizes( ::google::protobuf::uint8* CodeGeneratorResponse_File::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse.File) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -2096,6 +2098,7 @@ void CodeGeneratorResponse::SerializeWithCachedSizes( ::google::protobuf::uint8* CodeGeneratorResponse::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; diff --git a/src/google/protobuf/descriptor.pb.cc b/src/google/protobuf/descriptor.pb.cc index 56c395e6..b389a4e4 100644 --- a/src/google/protobuf/descriptor.pb.cc +++ b/src/google/protobuf/descriptor.pb.cc @@ -1123,6 +1123,7 @@ void FileDescriptorSet::SerializeWithCachedSizes( ::google::protobuf::uint8* FileDescriptorSet::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorSet) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1720,6 +1721,7 @@ void FileDescriptorProto::SerializeWithCachedSizes( ::google::protobuf::uint8* FileDescriptorProto::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorProto) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -2746,6 +2748,7 @@ void DescriptorProto_ExtensionRange::SerializeWithCachedSizes( ::google::protobuf::uint8* DescriptorProto_ExtensionRange::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ExtensionRange) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -3083,6 +3086,7 @@ void DescriptorProto_ReservedRange::SerializeWithCachedSizes( ::google::protobuf::uint8* DescriptorProto_ReservedRange::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ReservedRange) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -3619,6 +3623,7 @@ void DescriptorProto::SerializeWithCachedSizes( ::google::protobuf::uint8* DescriptorProto::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -4747,6 +4752,7 @@ void FieldDescriptorProto::SerializeWithCachedSizes( ::google::protobuf::uint8* FieldDescriptorProto::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldDescriptorProto) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -5689,6 +5695,7 @@ void OneofDescriptorProto::SerializeWithCachedSizes( ::google::protobuf::uint8* OneofDescriptorProto::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.OneofDescriptorProto) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -6140,6 +6147,7 @@ void EnumDescriptorProto::SerializeWithCachedSizes( ::google::protobuf::uint8* EnumDescriptorProto::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumDescriptorProto) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -6644,6 +6652,7 @@ void EnumValueDescriptorProto::SerializeWithCachedSizes( ::google::protobuf::uint8* EnumValueDescriptorProto::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueDescriptorProto) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -7136,6 +7145,7 @@ void ServiceDescriptorProto::SerializeWithCachedSizes( ::google::protobuf::uint8* ServiceDescriptorProto::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceDescriptorProto) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -7739,6 +7749,7 @@ void MethodDescriptorProto::SerializeWithCachedSizes( ::google::protobuf::uint8* MethodDescriptorProto::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodDescriptorProto) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -8838,6 +8849,7 @@ void FileOptions::SerializeWithCachedSizes( ::google::protobuf::uint8* FileOptions::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileOptions) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -10182,6 +10194,7 @@ void MessageOptions::SerializeWithCachedSizes( ::google::protobuf::uint8* MessageOptions::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MessageOptions) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -10778,6 +10791,7 @@ void FieldOptions::SerializeWithCachedSizes( ::google::protobuf::uint8* FieldOptions::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldOptions) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -11314,6 +11328,7 @@ void OneofOptions::SerializeWithCachedSizes( ::google::protobuf::uint8* OneofOptions::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.OneofOptions) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -11659,6 +11674,7 @@ void EnumOptions::SerializeWithCachedSizes( ::google::protobuf::uint8* EnumOptions::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumOptions) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -12061,6 +12077,7 @@ void EnumValueOptions::SerializeWithCachedSizes( ::google::protobuf::uint8* EnumValueOptions::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueOptions) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -12419,6 +12436,7 @@ void ServiceOptions::SerializeWithCachedSizes( ::google::protobuf::uint8* ServiceOptions::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceOptions) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -12809,6 +12827,7 @@ void MethodOptions::SerializeWithCachedSizes( ::google::protobuf::uint8* MethodOptions::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodOptions) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -13219,6 +13238,7 @@ void UninterpretedOption_NamePart::SerializeWithCachedSizes( ::google::protobuf::uint8* UninterpretedOption_NamePart::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption.NamePart) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -13763,6 +13783,7 @@ void UninterpretedOption::SerializeWithCachedSizes( ::google::protobuf::uint8* UninterpretedOption::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -14562,6 +14583,7 @@ void SourceCodeInfo_Location::SerializeWithCachedSizes( ::google::protobuf::uint8* SourceCodeInfo_Location::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo.Location) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -15168,6 +15190,7 @@ void SourceCodeInfo::SerializeWithCachedSizes( ::google::protobuf::uint8* SourceCodeInfo::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -15536,6 +15559,7 @@ void GeneratedCodeInfo_Annotation::SerializeWithCachedSizes( ::google::protobuf::uint8* GeneratedCodeInfo_Annotation::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.GeneratedCodeInfo.Annotation) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -15989,6 +16013,7 @@ void GeneratedCodeInfo::SerializeWithCachedSizes( ::google::protobuf::uint8* GeneratedCodeInfo::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.GeneratedCodeInfo) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; diff --git a/src/google/protobuf/duration.pb.cc b/src/google/protobuf/duration.pb.cc index ae1a5e08..7edb4f2b 100644 --- a/src/google/protobuf/duration.pb.cc +++ b/src/google/protobuf/duration.pb.cc @@ -299,6 +299,7 @@ void Duration::SerializeWithCachedSizes( ::google::protobuf::uint8* Duration::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Duration) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; diff --git a/src/google/protobuf/empty.pb.cc b/src/google/protobuf/empty.pb.cc index 71195056..01f8bbcf 100644 --- a/src/google/protobuf/empty.pb.cc +++ b/src/google/protobuf/empty.pb.cc @@ -244,6 +244,7 @@ void Empty::SerializeWithCachedSizes( ::google::protobuf::uint8* Empty::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Empty) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; diff --git a/src/google/protobuf/field_mask.pb.cc b/src/google/protobuf/field_mask.pb.cc index 094c4cc9..0714f18c 100644 --- a/src/google/protobuf/field_mask.pb.cc +++ b/src/google/protobuf/field_mask.pb.cc @@ -264,6 +264,7 @@ void FieldMask::SerializeWithCachedSizes( ::google::protobuf::uint8* FieldMask::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldMask) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; diff --git a/src/google/protobuf/source_context.pb.cc b/src/google/protobuf/source_context.pb.cc index 3244444a..203b4df2 100644 --- a/src/google/protobuf/source_context.pb.cc +++ b/src/google/protobuf/source_context.pb.cc @@ -269,6 +269,7 @@ void SourceContext::SerializeWithCachedSizes( ::google::protobuf::uint8* SourceContext::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceContext) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; diff --git a/src/google/protobuf/struct.pb.cc b/src/google/protobuf/struct.pb.cc index 207e9efe..ac53d315 100644 --- a/src/google/protobuf/struct.pb.cc +++ b/src/google/protobuf/struct.pb.cc @@ -436,6 +436,7 @@ void Struct::SerializeWithCachedSizes( ::google::protobuf::uint8* Struct::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Struct) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -952,6 +953,7 @@ void Value::SerializeWithCachedSizes( ::google::protobuf::uint8* Value::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Value) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1683,6 +1685,7 @@ void ListValue::SerializeWithCachedSizes( ::google::protobuf::uint8* ListValue::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ListValue) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; diff --git a/src/google/protobuf/timestamp.pb.cc b/src/google/protobuf/timestamp.pb.cc index b2fe28a4..b05f61ce 100644 --- a/src/google/protobuf/timestamp.pb.cc +++ b/src/google/protobuf/timestamp.pb.cc @@ -299,6 +299,7 @@ void Timestamp::SerializeWithCachedSizes( ::google::protobuf::uint8* Timestamp::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Timestamp) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; diff --git a/src/google/protobuf/type.pb.cc b/src/google/protobuf/type.pb.cc index 8f017a89..fd61906f 100644 --- a/src/google/protobuf/type.pb.cc +++ b/src/google/protobuf/type.pb.cc @@ -667,6 +667,7 @@ void Type::SerializeWithCachedSizes( ::google::protobuf::uint8* Type::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Type) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1530,6 +1531,7 @@ void Field::SerializeWithCachedSizes( ::google::protobuf::uint8* Field::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Field) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -2466,6 +2468,7 @@ void Enum::SerializeWithCachedSizes( ::google::protobuf::uint8* Enum::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Enum) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -3047,6 +3050,7 @@ void EnumValue::SerializeWithCachedSizes( ::google::protobuf::uint8* EnumValue::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValue) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -3529,6 +3533,7 @@ void Option::SerializeWithCachedSizes( ::google::protobuf::uint8* Option::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Option) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; diff --git a/src/google/protobuf/wrappers.pb.cc b/src/google/protobuf/wrappers.pb.cc index 12c04fd5..e82736b3 100644 --- a/src/google/protobuf/wrappers.pb.cc +++ b/src/google/protobuf/wrappers.pb.cc @@ -392,6 +392,7 @@ void DoubleValue::SerializeWithCachedSizes( ::google::protobuf::uint8* DoubleValue::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DoubleValue) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -656,6 +657,7 @@ void FloatValue::SerializeWithCachedSizes( ::google::protobuf::uint8* FloatValue::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FloatValue) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -920,6 +922,7 @@ void Int64Value::SerializeWithCachedSizes( ::google::protobuf::uint8* Int64Value::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Int64Value) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1186,6 +1189,7 @@ void UInt64Value::SerializeWithCachedSizes( ::google::protobuf::uint8* UInt64Value::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UInt64Value) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1452,6 +1456,7 @@ void Int32Value::SerializeWithCachedSizes( ::google::protobuf::uint8* Int32Value::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Int32Value) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1718,6 +1723,7 @@ void UInt32Value::SerializeWithCachedSizes( ::google::protobuf::uint8* UInt32Value::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UInt32Value) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1984,6 +1990,7 @@ void BoolValue::SerializeWithCachedSizes( ::google::protobuf::uint8* BoolValue::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.BoolValue) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -2260,6 +2267,7 @@ void StringValue::SerializeWithCachedSizes( ::google::protobuf::uint8* StringValue::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.StringValue) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -2589,6 +2597,7 @@ void BytesValue::SerializeWithCachedSizes( ::google::protobuf::uint8* BytesValue::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.BytesValue) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; -- cgit v1.2.3 From 969e0bece2c77900a2dca78013ebb1f39daee3dd Mon Sep 17 00:00:00 2001 From: Steven Peters Date: Thu, 11 May 2017 16:35:32 -0700 Subject: regenerate plugin and profile message code --- src/google/protobuf/compiler/plugin.pb.cc | 1 + src/google/protobuf/compiler/profile.pb.cc | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/google/protobuf/compiler/plugin.pb.cc b/src/google/protobuf/compiler/plugin.pb.cc index 83b035f8..65fdd9f5 100644 --- a/src/google/protobuf/compiler/plugin.pb.cc +++ b/src/google/protobuf/compiler/plugin.pb.cc @@ -428,6 +428,7 @@ void Version::SerializeWithCachedSizes( ::google::protobuf::uint8* Version::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.Version) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; diff --git a/src/google/protobuf/compiler/profile.pb.cc b/src/google/protobuf/compiler/profile.pb.cc index c185e4f9..42cc6850 100644 --- a/src/google/protobuf/compiler/profile.pb.cc +++ b/src/google/protobuf/compiler/profile.pb.cc @@ -394,6 +394,7 @@ void FieldAccessInfo::SerializeWithCachedSizes( ::google::protobuf::uint8* FieldAccessInfo::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.FieldAccessInfo) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -889,6 +890,7 @@ void MessageAccessInfo::SerializeWithCachedSizes( ::google::protobuf::uint8* MessageAccessInfo::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.MessageAccessInfo) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1293,6 +1295,7 @@ void AccessInfo::SerializeWithCachedSizes( ::google::protobuf::uint8* AccessInfo::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.AccessInfo) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; -- cgit v1.2.3 From 129a6e2aca95dcfb6c3e717d7b9cca1f104fde39 Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Fri, 12 May 2017 15:29:08 -0700 Subject: Revert guava depedency to version 19. --- java/core/pom.xml | 5 ---- .../java/com/google/protobuf/TextFormatTest.java | 28 ++++++++++------------ java/pom.xml | 8 +------ 3 files changed, 14 insertions(+), 27 deletions(-) diff --git a/java/core/pom.xml b/java/core/pom.xml index 24bc58c7..bd035adf 100644 --- a/java/core/pom.xml +++ b/java/core/pom.xml @@ -34,11 +34,6 @@ easymockclassextension test - - com.google.truth - truth - test - diff --git a/java/core/src/test/java/com/google/protobuf/TextFormatTest.java b/java/core/src/test/java/com/google/protobuf/TextFormatTest.java index 249d7c5e..910f360f 100644 --- a/java/core/src/test/java/com/google/protobuf/TextFormatTest.java +++ b/java/core/src/test/java/com/google/protobuf/TextFormatTest.java @@ -30,8 +30,6 @@ package com.google.protobuf; -import static com.google.common.truth.Truth.assertThat; - import com.google.protobuf.Descriptors.Descriptor; import com.google.protobuf.Descriptors.FieldDescriptor; import com.google.protobuf.TextFormat.Parser.SingularOverwritePolicy; @@ -1079,12 +1077,12 @@ public class TextFormatTest extends TestCase { { TestMap.Builder dest = TestMap.newBuilder(); TextFormat.merge(text, dest); - assertThat(dest.build()).isEqualTo(message); + assertEquals(message, dest.build()); } { TestMap.Builder dest = TestMap.newBuilder(); parserWithOverwriteForbidden.merge(text, dest); - assertThat(dest.build()).isEqualTo(message); + assertEquals(message, dest.build()); } } @@ -1096,10 +1094,10 @@ public class TextFormatTest extends TestCase { TestMap.Builder dest = TestMap.newBuilder(); parserWithOverwriteForbidden.merge(text, dest); TestMap message = dest.build(); - assertThat(message.getStringToInt32Field().size()).isEqualTo(2); - assertThat(message.getInt32ToMessageField().size()).isEqualTo(2); - assertThat(message.getStringToInt32Field().get("x")).isEqualTo(10); - assertThat(message.getInt32ToMessageField().get(2).getValue()).isEqualTo(200); + assertEquals(2, message.getStringToInt32Field().size()); + assertEquals(2, message.getInt32ToMessageField().size()); + assertEquals(10, message.getStringToInt32Field().get("x").intValue()); + assertEquals(200, message.getInt32ToMessageField().get(2).getValue()); } public void testMapShortFormEmpty() throws Exception { @@ -1108,8 +1106,8 @@ public class TextFormatTest extends TestCase { TestMap.Builder dest = TestMap.newBuilder(); parserWithOverwriteForbidden.merge(text, dest); TestMap message = dest.build(); - assertThat(message.getStringToInt32Field().size()).isEqualTo(0); - assertThat(message.getInt32ToMessageField().size()).isEqualTo(0); + assertEquals(0, message.getStringToInt32Field().size()); + assertEquals(0, message.getInt32ToMessageField().size()); } public void testMapShortFormTrailingComma() throws Exception { @@ -1119,7 +1117,7 @@ public class TextFormatTest extends TestCase { parserWithOverwriteForbidden.merge(text, dest); fail("Expected parse exception."); } catch (TextFormat.ParseException e) { - assertThat(e).hasMessageThat().isEqualTo("1:48: Expected \"{\"."); + assertEquals("1:48: Expected \"{\".", e.getMessage()); } } @@ -1134,8 +1132,8 @@ public class TextFormatTest extends TestCase { TestMap.Builder builder = TestMap.newBuilder(); defaultParser.merge(text, builder); TestMap map = builder.build(); - assertThat(map.getInt32ToInt32Field().size()).isEqualTo(2); - assertThat(map.getInt32ToInt32Field().get(1).intValue()).isEqualTo(30); + assertEquals(2, map.getInt32ToInt32Field().size()); + assertEquals(30, map.getInt32ToInt32Field().get(1).intValue()); } { @@ -1144,8 +1142,8 @@ public class TextFormatTest extends TestCase { TestMap.Builder builder = TestMap.newBuilder(); defaultParser.merge(text, builder); TestMap map = builder.build(); - assertThat(map.getInt32ToInt32Field().size()).isEqualTo(2); - assertThat(map.getInt32ToInt32Field().get(1).intValue()).isEqualTo(30); + assertEquals(2, map.getInt32ToInt32Field().size()); + assertEquals(30, map.getInt32ToInt32Field().get(1).intValue()); } } diff --git a/java/pom.xml b/java/pom.xml index 2c2f4413..97338292 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -84,13 +84,7 @@ com.google.guava guava - 20.0 - - - com.google.truth - truth - test - 0.32 + 19.0 -- cgit v1.2.3 From 49a56da93ff3ab7d9a2252639344ad28db8cdff6 Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Fri, 12 May 2017 16:10:30 -0700 Subject: Update jenkins Java deps. --- jenkins/docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/docker/Dockerfile b/jenkins/docker/Dockerfile index 3173afbf..00eabeb0 100644 --- a/jenkins/docker/Dockerfile +++ b/jenkins/docker/Dockerfile @@ -129,7 +129,7 @@ ENV MVN mvn --batch-mode RUN cd /tmp && \ git clone https://github.com/google/protobuf.git && \ cd protobuf && \ - git reset --hard c2b3b3e04e7a023efe06f2107705b45428847800 && \ + git reset --hard 129a6e2aca95dcfb6c3e717d7b9cca1f104fde39 && \ ./autogen.sh && \ ./configure && \ make -j4 && \ -- cgit v1.2.3 From dba8928ff53ae372bba3d928a6145754a97238d5 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Mon, 29 May 2017 15:30:47 -0700 Subject: Add ARRAY for reserved name (#3150) --- php/ext/google/protobuf/def.c | 4 ++-- php/src/Google/Protobuf/descriptor.php | 2 +- php/tests/generated_class_test.php | 1 + php/tests/memory_leak_test.php | 1 + php/tests/proto/test.proto | 4 ++++ src/google/protobuf/compiler/php/php_generator.cc | 4 ++-- 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/php/ext/google/protobuf/def.c b/php/ext/google/protobuf/def.c index 8e563a61..099ebd05 100644 --- a/php/ext/google/protobuf/def.c +++ b/php/ext/google/protobuf/def.c @@ -30,8 +30,8 @@ #include "protobuf.h" -const char* const kReservedNames[] = {"Empty"}; -const int kReservedNamesSize = 1; +const char* const kReservedNames[] = {"Empty", "ECHO", "ARRAY"}; +const int kReservedNamesSize = 3; // Forward declare. static void descriptor_init_c_instance(Descriptor* intern TSRMLS_DC); diff --git a/php/src/Google/Protobuf/descriptor.php b/php/src/Google/Protobuf/descriptor.php index fb69eda0..35e4929b 100644 --- a/php/src/Google/Protobuf/descriptor.php +++ b/php/src/Google/Protobuf/descriptor.php @@ -236,7 +236,7 @@ function getClassNamePrefix( return $prefix; } - $reserved_words = array("Empty"); + $reserved_words = array("Empty", "ECHO", "ARRAY"); foreach ($reserved_words as $reserved_word) { if ($classname === $reserved_word) { if ($file_proto->getPackage() === "google.protobuf") { diff --git a/php/tests/generated_class_test.php b/php/tests/generated_class_test.php index 21ee8490..7289bbc5 100644 --- a/php/tests/generated_class_test.php +++ b/php/tests/generated_class_test.php @@ -876,5 +876,6 @@ class GeneratedClassTest extends TestBase $m = new \Foo\TestMessage_Empty(); $m = new \Foo\PBEmpty(); $m = new \PrefixEmpty(); + $m = new \Foo\PBARRAY(); } } diff --git a/php/tests/memory_leak_test.php b/php/tests/memory_leak_test.php index 361982b5..5eac56f0 100644 --- a/php/tests/memory_leak_test.php +++ b/php/tests/memory_leak_test.php @@ -8,6 +8,7 @@ require_once('generated/NoNamespaceMessage_NestedEnum.php'); require_once('generated/PrefixEmpty.php'); require_once('generated/PrefixTestPrefix.php'); require_once('generated/Bar/TestInclude.php'); +require_once('generated/Foo/PBARRAY.php'); require_once('generated/Foo/PBEmpty.php'); require_once('generated/Foo/TestEnum.php'); require_once('generated/Foo/TestIncludePrefixMessage.php'); diff --git a/php/tests/proto/test.proto b/php/tests/proto/test.proto index 39229254..583bf8e1 100644 --- a/php/tests/proto/test.proto +++ b/php/tests/proto/test.proto @@ -127,6 +127,10 @@ message Empty { int32 a = 1; } +message ARRAY { + int32 a = 1; +} + message TestPackedMessage { repeated int32 repeated_int32 = 90 [packed = true]; repeated int64 repeated_int64 = 91 [packed = true]; diff --git a/src/google/protobuf/compiler/php/php_generator.cc b/src/google/protobuf/compiler/php/php_generator.cc index ea850c0f..f8e7e5f0 100644 --- a/src/google/protobuf/compiler/php/php_generator.cc +++ b/src/google/protobuf/compiler/php/php_generator.cc @@ -49,8 +49,8 @@ const std::string kDescriptorMetadataFile = "GPBMetadata/Google/Protobuf/Internal/Descriptor.php"; const std::string kDescriptorDirName = "Google/Protobuf/Internal"; const std::string kDescriptorPackageName = "Google\\Protobuf\\Internal"; -const char* const kReservedNames[] = {"Empty", "ECHO"}; -const int kReservedNamesSize = 2; +const char* const kReservedNames[] = {"ARRAY", "Empty", "ECHO"}; +const int kReservedNamesSize = 3; namespace google { namespace protobuf { -- cgit v1.2.3 From c344fe8caa6da817d3f0ece0babf1d1acbf2bbbf Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Mon, 29 May 2017 22:04:20 -0700 Subject: Oneof field should be serialized even it's equal to default. (#3153) --- php/ext/google/protobuf/encode_decode.c | 4 +++- php/src/Google/Protobuf/Internal/Message.php | 7 +++++++ php/tests/encode_decode_test.php | 7 +++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/php/ext/google/protobuf/encode_decode.c b/php/ext/google/protobuf/encode_decode.c index 28bf18f4..6e3c606b 100644 --- a/php/ext/google/protobuf/encode_decode.c +++ b/php/ext/google/protobuf/encode_decode.c @@ -1167,6 +1167,7 @@ static void putrawmsg(MessageHeader* msg, const Descriptor* desc, upb_msg_field_next(&i)) { upb_fielddef* f = upb_msg_iter_field(&i); uint32_t offset = desc->layout->fields[upb_fielddef_index(f)].offset; + bool containing_oneof = false; if (upb_fielddef_containingoneof(f)) { uint32_t oneof_case_offset = @@ -1179,6 +1180,7 @@ static void putrawmsg(MessageHeader* msg, const Descriptor* desc, } // Otherwise, fall through to the appropriate singular-field handler // below. + containing_oneof = true; } if (is_map_field(f)) { @@ -1209,7 +1211,7 @@ static void putrawmsg(MessageHeader* msg, const Descriptor* desc, #define T(upbtypeconst, upbtype, ctype, default_value) \ case upbtypeconst: { \ ctype value = DEREF(message_data(msg), offset, ctype); \ - if (value != default_value) { \ + if (containing_oneof || value != default_value) { \ upb_sink_put##upbtype(sink, sel, value); \ } \ } break; diff --git a/php/src/Google/Protobuf/Internal/Message.php b/php/src/Google/Protobuf/Internal/Message.php index cd15e0f0..10c639ac 100644 --- a/php/src/Google/Protobuf/Internal/Message.php +++ b/php/src/Google/Protobuf/Internal/Message.php @@ -739,6 +739,13 @@ class Message */ private function existField($field) { + $oneof_index = $field->getOneofIndex(); + if ($oneof_index !== -1) { + $oneof = $this->desc->getOneofDecl()[$oneof_index]; + $oneof_name = $oneof->getName(); + return $this->$oneof_name->getNumber() === $field->getNumber(); + } + $getter = $field->getGetter(); $value = $this->$getter(); return $value !== $this->defaultValue($field); diff --git a/php/tests/encode_decode_test.php b/php/tests/encode_decode_test.php index 288df569..b4cfed42 100644 --- a/php/tests/encode_decode_test.php +++ b/php/tests/encode_decode_test.php @@ -88,6 +88,13 @@ class EncodeDecodeTest extends TestBase $n = new TestMessage(); $n->mergeFromString($data); $this->assertSame(1, $n->getOneofMessage()->getA()); + + // Encode default value + $m->setOneofEnum(TestEnum::ZERO); + $data = $m->serializeToString(); + $n = new TestMessage(); + $n->mergeFromString($data); + $this->assertSame("oneof_enum", $n->getMyOneof()); } public function testPackedEncode() -- cgit v1.2.3 From 3b1a87518cead7403b8e13c41945e41a30d602e4 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Sat, 17 Jun 2017 11:01:16 -0700 Subject: Remove inclusion of ext/json/php_json.h. (#3241) That implementation of json is not being used - this extension is using a json encoder/decoder provided by 'upb'. --- php/ext/google/protobuf/message.c | 1 - 1 file changed, 1 deletion(-) diff --git a/php/ext/google/protobuf/message.c b/php/ext/google/protobuf/message.c index 48b87b10..1162a5f8 100644 --- a/php/ext/google/protobuf/message.c +++ b/php/ext/google/protobuf/message.c @@ -30,7 +30,6 @@ #include #include -#include #include "protobuf.h" -- cgit v1.2.3 From e7bcfc42411c8c1ffcec68474b308bc1da21f460 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Wed, 21 Jun 2017 10:20:34 -0700 Subject: Update version number to 3.3.2 --- Protobuf.podspec | 2 +- configure.ac | 2 +- csharp/Google.Protobuf.Tools.nuspec | 2 +- csharp/src/Google.Protobuf/project.json | 2 +- java/core/pom.xml | 2 +- java/pom.xml | 2 +- java/util/pom.xml | 2 +- js/package.json | 2 +- php/ext/google/protobuf/package.xml | 18 +++++++++++++++++- php/ext/google/protobuf/protobuf.h | 2 +- protoc-artifacts/pom.xml | 2 +- python/google/protobuf/__init__.py | 2 +- ruby/google-protobuf.gemspec | 2 +- src/Makefile.am | 6 +++--- src/google/protobuf/stubs/common.h | 2 +- 15 files changed, 33 insertions(+), 17 deletions(-) diff --git a/Protobuf.podspec b/Protobuf.podspec index ffaf7a72..941bf5fb 100644 --- a/Protobuf.podspec +++ b/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.3.1' + s.version = '3.3.2' s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.' s.homepage = 'https://github.com/google/protobuf' s.license = '3-Clause BSD License' diff --git a/configure.ac b/configure.ac index e06ebe5f..e75bdbaa 100644 --- a/configure.ac +++ b/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.3.1],[protobuf@googlegroups.com],[protobuf]) +AC_INIT([Protocol Buffers],[3.3.2],[protobuf@googlegroups.com],[protobuf]) AM_MAINTAINER_MODE([enable]) diff --git a/csharp/Google.Protobuf.Tools.nuspec b/csharp/Google.Protobuf.Tools.nuspec index 18a03f59..95e6b04a 100644 --- a/csharp/Google.Protobuf.Tools.nuspec +++ b/csharp/Google.Protobuf.Tools.nuspec @@ -5,7 +5,7 @@ Google Protocol Buffers tools Tools for Protocol Buffers - Google's data interchange format. See project site for more info. - 3.3.1 + 3.3.2 Google Inc. protobuf-packages https://github.com/google/protobuf/blob/master/LICENSE diff --git a/csharp/src/Google.Protobuf/project.json b/csharp/src/Google.Protobuf/project.json index 6596ddf6..38830d01 100644 --- a/csharp/src/Google.Protobuf/project.json +++ b/csharp/src/Google.Protobuf/project.json @@ -1,5 +1,5 @@ { - "version": "3.3.1", + "version": "3.3.2", "title": "Google Protocol Buffers", "description": "See project site for more info.", "authors": [ "Google Inc." ], diff --git a/java/core/pom.xml b/java/core/pom.xml index bd035adf..e4f50dd1 100644 --- a/java/core/pom.xml +++ b/java/core/pom.xml @@ -6,7 +6,7 @@ com.google.protobuf protobuf-parent - 3.3.1 + 3.3.2 protobuf-java diff --git a/java/pom.xml b/java/pom.xml index 97338292..39ed31ab 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -11,7 +11,7 @@ com.google.protobuf protobuf-parent - 3.3.1 + 3.3.2 pom Protocol Buffers [Parent] diff --git a/java/util/pom.xml b/java/util/pom.xml index 8a54e10d..62394ed7 100644 --- a/java/util/pom.xml +++ b/java/util/pom.xml @@ -6,7 +6,7 @@ com.google.protobuf protobuf-parent - 3.3.1 + 3.3.2 protobuf-java-util diff --git a/js/package.json b/js/package.json index b7343cc3..afb223db 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "google-protobuf", - "version": "3.3.1", + "version": "3.3.2", "description": "Protocol Buffers for JavaScript", "main": "google-protobuf.js", "files": [ diff --git a/php/ext/google/protobuf/package.xml b/php/ext/google/protobuf/package.xml index 2c405aa9..20a45bc6 100644 --- a/php/ext/google/protobuf/package.xml +++ b/php/ext/google/protobuf/package.xml @@ -13,7 +13,7 @@ 2017-01-13 - 3.3.1 + 3.3.2 3.3.0 @@ -117,6 +117,22 @@ GA release. 3-Clause BSD License +GA release. + + + + + 3.3.2 + 3.3.0 + + + stable + stable + + 2017-06-21 + + 3-Clause BSD License + GA release. diff --git a/php/ext/google/protobuf/protobuf.h b/php/ext/google/protobuf/protobuf.h index c3374af3..8a4b82da 100644 --- a/php/ext/google/protobuf/protobuf.h +++ b/php/ext/google/protobuf/protobuf.h @@ -37,7 +37,7 @@ #include "upb.h" #define PHP_PROTOBUF_EXTNAME "protobuf" -#define PHP_PROTOBUF_VERSION "3.3.1" +#define PHP_PROTOBUF_VERSION "3.3.2" #define MAX_LENGTH_OF_INT64 20 #define SIZEOF_INT64 8 diff --git a/protoc-artifacts/pom.xml b/protoc-artifacts/pom.xml index eeb2987f..6003f09d 100644 --- a/protoc-artifacts/pom.xml +++ b/protoc-artifacts/pom.xml @@ -10,7 +10,7 @@ com.google.protobuf protoc - 3.3.1 + 3.3.2 pom Protobuf Compiler diff --git a/python/google/protobuf/__init__.py b/python/google/protobuf/__init__.py index 8628edd7..622dfb3d 100755 --- a/python/google/protobuf/__init__.py +++ b/python/google/protobuf/__init__.py @@ -30,7 +30,7 @@ # Copyright 2007 Google Inc. All Rights Reserved. -__version__ = '3.3.1' +__version__ = '3.3.2' if __name__ != '__main__': try: diff --git a/ruby/google-protobuf.gemspec b/ruby/google-protobuf.gemspec index 8aff7bf0..bed835cb 100644 --- a/ruby/google-protobuf.gemspec +++ b/ruby/google-protobuf.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = "google-protobuf" - s.version = "3.3.1" + s.version = "3.3.2" s.licenses = ["BSD-3-Clause"] s.summary = "Protocol Buffers" s.description = "Protocol Buffers are Google's data interchange format." diff --git a/src/Makefile.am b/src/Makefile.am index 4524aeb2..d17355e0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -184,7 +184,7 @@ nobase_include_HEADERS = \ lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS) -libprotobuf_lite_la_LDFLAGS = -version-info 13:1:0 -export-dynamic -no-undefined +libprotobuf_lite_la_LDFLAGS = -version-info 13:2:0 -export-dynamic -no-undefined if HAVE_LD_VERSION_SCRIPT libprotobuf_lite_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf-lite.map EXTRA_libprotobuf_lite_la_DEPENDENCIES = libprotobuf-lite.map @@ -229,7 +229,7 @@ libprotobuf_lite_la_SOURCES = \ google/protobuf/io/zero_copy_stream_impl_lite.cc libprotobuf_la_LIBADD = $(PTHREAD_LIBS) -libprotobuf_la_LDFLAGS = -version-info 13:1:0 -export-dynamic -no-undefined +libprotobuf_la_LDFLAGS = -version-info 13:2:0 -export-dynamic -no-undefined if HAVE_LD_VERSION_SCRIPT libprotobuf_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf.map EXTRA_libprotobuf_la_DEPENDENCIES = libprotobuf.map @@ -319,7 +319,7 @@ libprotobuf_la_SOURCES = \ nodist_libprotobuf_la_SOURCES = $(nodist_libprotobuf_lite_la_SOURCES) libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la -libprotoc_la_LDFLAGS = -version-info 13:1:0 -export-dynamic -no-undefined +libprotoc_la_LDFLAGS = -version-info 13:2:0 -export-dynamic -no-undefined if HAVE_LD_VERSION_SCRIPT libprotoc_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotoc.map EXTRA_libprotoc_la_DEPENDENCIES = libprotoc.map diff --git a/src/google/protobuf/stubs/common.h b/src/google/protobuf/stubs/common.h index 15321ebe..daa9b223 100644 --- a/src/google/protobuf/stubs/common.h +++ b/src/google/protobuf/stubs/common.h @@ -96,7 +96,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 3003001 +#define GOOGLE_PROTOBUF_VERSION 3003002 // A suffix string for alpha, beta or rc releases. Empty for stable releases. #define GOOGLE_PROTOBUF_VERSION_SUFFIX "" -- cgit v1.2.3 From 5520b4384a87d010814bfc503cc2df109268a9a8 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Wed, 21 Jun 2017 11:17:30 -0700 Subject: Update C++ generated code. --- src/google/protobuf/any.pb.h | 2 +- src/google/protobuf/api.pb.h | 2 +- src/google/protobuf/compiler/plugin.pb.h | 2 +- src/google/protobuf/compiler/profile.pb.h | 2 +- src/google/protobuf/descriptor.pb.h | 2 +- src/google/protobuf/duration.pb.h | 2 +- src/google/protobuf/empty.pb.h | 2 +- src/google/protobuf/field_mask.pb.h | 2 +- src/google/protobuf/source_context.pb.h | 2 +- src/google/protobuf/struct.pb.h | 2 +- src/google/protobuf/timestamp.pb.h | 2 +- src/google/protobuf/type.pb.h | 2 +- src/google/protobuf/wrappers.pb.h | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/google/protobuf/any.pb.h b/src/google/protobuf/any.pb.h index ef366798..ad2073a8 100644 --- a/src/google/protobuf/any.pb.h +++ b/src/google/protobuf/any.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003002 < GOOGLE_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. diff --git a/src/google/protobuf/api.pb.h b/src/google/protobuf/api.pb.h index 36bf43c7..5b68bd98 100644 --- a/src/google/protobuf/api.pb.h +++ b/src/google/protobuf/api.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003002 < GOOGLE_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. diff --git a/src/google/protobuf/compiler/plugin.pb.h b/src/google/protobuf/compiler/plugin.pb.h index 84343688..baeb6a1d 100644 --- a/src/google/protobuf/compiler/plugin.pb.h +++ b/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 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003002 < GOOGLE_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. diff --git a/src/google/protobuf/compiler/profile.pb.h b/src/google/protobuf/compiler/profile.pb.h index 0b023eb0..b4931cf1 100644 --- a/src/google/protobuf/compiler/profile.pb.h +++ b/src/google/protobuf/compiler/profile.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003002 < GOOGLE_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. diff --git a/src/google/protobuf/descriptor.pb.h b/src/google/protobuf/descriptor.pb.h index ef77e6eb..a2e91d72 100644 --- a/src/google/protobuf/descriptor.pb.h +++ b/src/google/protobuf/descriptor.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003002 < GOOGLE_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. diff --git a/src/google/protobuf/duration.pb.h b/src/google/protobuf/duration.pb.h index d9cd405d..02679c6a 100644 --- a/src/google/protobuf/duration.pb.h +++ b/src/google/protobuf/duration.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003002 < GOOGLE_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. diff --git a/src/google/protobuf/empty.pb.h b/src/google/protobuf/empty.pb.h index c318cceb..306301a4 100644 --- a/src/google/protobuf/empty.pb.h +++ b/src/google/protobuf/empty.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003002 < GOOGLE_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. diff --git a/src/google/protobuf/field_mask.pb.h b/src/google/protobuf/field_mask.pb.h index c63cbad7..42110be6 100644 --- a/src/google/protobuf/field_mask.pb.h +++ b/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 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003002 < GOOGLE_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. diff --git a/src/google/protobuf/source_context.pb.h b/src/google/protobuf/source_context.pb.h index 1c72780c..66ee1886 100644 --- a/src/google/protobuf/source_context.pb.h +++ b/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 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003002 < GOOGLE_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. diff --git a/src/google/protobuf/struct.pb.h b/src/google/protobuf/struct.pb.h index 3f2d8bc0..c70912cd 100644 --- a/src/google/protobuf/struct.pb.h +++ b/src/google/protobuf/struct.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003002 < GOOGLE_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. diff --git a/src/google/protobuf/timestamp.pb.h b/src/google/protobuf/timestamp.pb.h index abc997eb..9ce2c96a 100644 --- a/src/google/protobuf/timestamp.pb.h +++ b/src/google/protobuf/timestamp.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003002 < GOOGLE_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. diff --git a/src/google/protobuf/type.pb.h b/src/google/protobuf/type.pb.h index 6e3d997a..85c6390b 100644 --- a/src/google/protobuf/type.pb.h +++ b/src/google/protobuf/type.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003002 < GOOGLE_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. diff --git a/src/google/protobuf/wrappers.pb.h b/src/google/protobuf/wrappers.pb.h index 9a91be3d..7495aa68 100644 --- a/src/google/protobuf/wrappers.pb.h +++ b/src/google/protobuf/wrappers.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3003002 < GOOGLE_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. -- cgit v1.2.3