diff options
author | Adam Cozzette <acozzette@google.com> | 2018-06-25 13:22:10 -0700 |
---|---|---|
committer | Adam Cozzette <acozzette@google.com> | 2018-06-25 13:22:10 -0700 |
commit | 82d3d7d250645322f8a7343188e5ae6246a76414 (patch) | |
tree | 34b7acb87b15c3b8395df3d311f2e795a1285d60 /src | |
parent | 35567c166842cca3ff6af3226ff526f25c79507f (diff) | |
parent | f7ada1280fac4af717d478e6a9765d3f02b418b3 (diff) |
Merge branch '3.6.x' into merge-3-6-x
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 6 | ||||
-rw-r--r-- | src/google/protobuf/any.pb.h | 4 | ||||
-rw-r--r-- | src/google/protobuf/api.pb.h | 4 | ||||
-rwxr-xr-x | src/google/protobuf/compiler/js/js_generator.cc | 6 | ||||
-rw-r--r-- | src/google/protobuf/compiler/plugin.pb.h | 4 | ||||
-rw-r--r-- | src/google/protobuf/descriptor.cc | 14 | ||||
-rw-r--r-- | src/google/protobuf/descriptor.pb.h | 4 | ||||
-rw-r--r-- | src/google/protobuf/duration.pb.h | 4 | ||||
-rw-r--r-- | src/google/protobuf/empty.pb.h | 4 | ||||
-rw-r--r-- | src/google/protobuf/field_mask.pb.h | 4 | ||||
-rw-r--r-- | src/google/protobuf/generated_message_util.h | 9 | ||||
-rw-r--r-- | src/google/protobuf/source_context.pb.h | 4 | ||||
-rw-r--r-- | src/google/protobuf/struct.pb.h | 4 | ||||
-rw-r--r-- | src/google/protobuf/stubs/common.h | 10 | ||||
-rw-r--r-- | src/google/protobuf/timestamp.pb.h | 4 | ||||
-rw-r--r-- | src/google/protobuf/type.pb.h | 4 | ||||
-rw-r--r-- | src/google/protobuf/wrappers.pb.h | 4 |
17 files changed, 52 insertions, 41 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index b8648049..09ab76f7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -164,7 +164,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 15:1:0 -export-dynamic -no-undefined +libprotobuf_lite_la_LDFLAGS = -version-info 16:0: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 @@ -210,7 +210,7 @@ libprotobuf_lite_la_SOURCES = \ google/protobuf/io/zero_copy_stream_impl_lite.cc libprotobuf_la_LIBADD = $(PTHREAD_LIBS) -libprotobuf_la_LDFLAGS = -version-info 15:1:0 -export-dynamic -no-undefined +libprotobuf_la_LDFLAGS = -version-info 16:0: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 @@ -301,7 +301,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 15:1:0 -export-dynamic -no-undefined +libprotoc_la_LDFLAGS = -version-info 16:0: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/any.pb.h b/src/google/protobuf/any.pb.h index bc537999..8a4c7f97 100644 --- a/src/google/protobuf/any.pb.h +++ b/src/google/protobuf/any.pb.h @@ -8,12 +8,12 @@ #include <google/protobuf/stubs/common.h> -#if GOOGLE_PROTOBUF_VERSION < 3005000 +#if GOOGLE_PROTOBUF_VERSION < 3006000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3005001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3006000 < 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 5a720cce..0f90f411 100644 --- a/src/google/protobuf/api.pb.h +++ b/src/google/protobuf/api.pb.h @@ -8,12 +8,12 @@ #include <google/protobuf/stubs/common.h> -#if GOOGLE_PROTOBUF_VERSION < 3005000 +#if GOOGLE_PROTOBUF_VERSION < 3006000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3005001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3006000 < 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/js/js_generator.cc b/src/google/protobuf/compiler/js/js_generator.cc index 7109ed5b..dfa60068 100755 --- a/src/google/protobuf/compiler/js/js_generator.cc +++ b/src/google/protobuf/compiler/js/js_generator.cc @@ -2962,8 +2962,12 @@ void Generator::GenerateClassDeserializeBinaryField( if (value_field->type() == FieldDescriptor::TYPE_MESSAGE) { printer->Print(", $messageType$.deserializeBinaryFromReader", "messageType", GetMessagePath(options, value_field->message_type())); + } else { + printer->Print(", null"); } - + printer->Print(", $defaultKey$", + "defaultKey", JSFieldDefault(key_field) + ); printer->Print(");\n"); printer->Print(" });\n"); } else { diff --git a/src/google/protobuf/compiler/plugin.pb.h b/src/google/protobuf/compiler/plugin.pb.h index 5ad6b4d3..d5b70a88 100644 --- a/src/google/protobuf/compiler/plugin.pb.h +++ b/src/google/protobuf/compiler/plugin.pb.h @@ -8,12 +8,12 @@ #include <google/protobuf/stubs/common.h> -#if GOOGLE_PROTOBUF_VERSION < 3005000 +#if GOOGLE_PROTOBUF_VERSION < 3006000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3005001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3006000 < 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.cc b/src/google/protobuf/descriptor.cc index dae24f9e..60b2a30e 100644 --- a/src/google/protobuf/descriptor.cc +++ b/src/google/protobuf/descriptor.cc @@ -775,10 +775,10 @@ class FileDescriptorTables { SymbolsByParentMap symbols_by_parent_; mutable FieldsByNameMap fields_by_lowercase_name_; - mutable FieldsByNameMap* fields_by_lowercase_name_tmp_; + std::unique_ptr<FieldsByNameMap> fields_by_lowercase_name_tmp_; mutable GoogleOnceDynamic fields_by_lowercase_name_once_; mutable FieldsByNameMap fields_by_camelcase_name_; - mutable FieldsByNameMap* fields_by_camelcase_name_tmp_; + std::unique_ptr<FieldsByNameMap> fields_by_camelcase_name_tmp_; mutable GoogleOnceDynamic fields_by_camelcase_name_once_; FieldsByNumberMap fields_by_number_; // Not including extensions. EnumValuesByNumberMap enum_values_by_number_; @@ -1146,10 +1146,8 @@ bool DescriptorPool::Tables::AddFile(const FileDescriptor* file) { void FileDescriptorTables::FinalizeTables() { // Clean up the temporary maps used by AddFieldByStylizedNames(). - delete fields_by_lowercase_name_tmp_; - fields_by_lowercase_name_tmp_ = NULL; - delete fields_by_camelcase_name_tmp_; - fields_by_camelcase_name_tmp_ = NULL; + fields_by_lowercase_name_tmp_ = nullptr; + fields_by_camelcase_name_tmp_ = nullptr; } void FileDescriptorTables::AddFieldByStylizedNames( @@ -1164,7 +1162,7 @@ void FileDescriptorTables::AddFieldByStylizedNames( // entries from fields_by_number_. PointerStringPair lowercase_key(parent, field->lowercase_name().c_str()); - if (!InsertIfNotPresent(fields_by_lowercase_name_tmp_, lowercase_key, + if (!InsertIfNotPresent(fields_by_lowercase_name_tmp_.get(), lowercase_key, field)) { InsertIfNotPresent( &fields_by_lowercase_name_, lowercase_key, @@ -1172,7 +1170,7 @@ void FileDescriptorTables::AddFieldByStylizedNames( } PointerStringPair camelcase_key(parent, field->camelcase_name().c_str()); - if (!InsertIfNotPresent(fields_by_camelcase_name_tmp_, camelcase_key, + if (!InsertIfNotPresent(fields_by_camelcase_name_tmp_.get(), camelcase_key, field)) { InsertIfNotPresent( &fields_by_camelcase_name_, camelcase_key, diff --git a/src/google/protobuf/descriptor.pb.h b/src/google/protobuf/descriptor.pb.h index 5e7a05d5..7a8617a2 100644 --- a/src/google/protobuf/descriptor.pb.h +++ b/src/google/protobuf/descriptor.pb.h @@ -8,12 +8,12 @@ #include <google/protobuf/stubs/common.h> -#if GOOGLE_PROTOBUF_VERSION < 3005000 +#if GOOGLE_PROTOBUF_VERSION < 3006000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3005001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3006000 < 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 3d0889d1..751edbef 100644 --- a/src/google/protobuf/duration.pb.h +++ b/src/google/protobuf/duration.pb.h @@ -8,12 +8,12 @@ #include <google/protobuf/stubs/common.h> -#if GOOGLE_PROTOBUF_VERSION < 3005000 +#if GOOGLE_PROTOBUF_VERSION < 3006000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3005001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3006000 < 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 53857e5f..c3da4fa8 100644 --- a/src/google/protobuf/empty.pb.h +++ b/src/google/protobuf/empty.pb.h @@ -8,12 +8,12 @@ #include <google/protobuf/stubs/common.h> -#if GOOGLE_PROTOBUF_VERSION < 3005000 +#if GOOGLE_PROTOBUF_VERSION < 3006000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3005001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3006000 < 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 144b41fa..7550f7a9 100644 --- a/src/google/protobuf/field_mask.pb.h +++ b/src/google/protobuf/field_mask.pb.h @@ -8,12 +8,12 @@ #include <google/protobuf/stubs/common.h> -#if GOOGLE_PROTOBUF_VERSION < 3005000 +#if GOOGLE_PROTOBUF_VERSION < 3006000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3005001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3006000 < 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/generated_message_util.h b/src/google/protobuf/generated_message_util.h index bdaa561b..4da04cae 100644 --- a/src/google/protobuf/generated_message_util.h +++ b/src/google/protobuf/generated_message_util.h @@ -335,7 +335,16 @@ struct LIBPROTOBUF_EXPORT SCCInfoBase { kRunning = 1, kUninitialized = -1, // initial state }; +#ifndef _MSC_VER std::atomic<int> visit_status; +#else + // MSVC doesnt make std::atomic constant initialized. This union trick + // makes it so. + union { + int visit_status_to_make_linker_init; + std::atomic<int> visit_status; + }; +#endif int num_deps; void (*init_func)(); // This is followed by an array of num_deps diff --git a/src/google/protobuf/source_context.pb.h b/src/google/protobuf/source_context.pb.h index 16ed21ca..eee1b73f 100644 --- a/src/google/protobuf/source_context.pb.h +++ b/src/google/protobuf/source_context.pb.h @@ -8,12 +8,12 @@ #include <google/protobuf/stubs/common.h> -#if GOOGLE_PROTOBUF_VERSION < 3005000 +#if GOOGLE_PROTOBUF_VERSION < 3006000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3005001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3006000 < 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 75665ff2..b2263435 100644 --- a/src/google/protobuf/struct.pb.h +++ b/src/google/protobuf/struct.pb.h @@ -8,12 +8,12 @@ #include <google/protobuf/stubs/common.h> -#if GOOGLE_PROTOBUF_VERSION < 3005000 +#if GOOGLE_PROTOBUF_VERSION < 3006000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3005001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3006000 < 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/stubs/common.h b/src/google/protobuf/stubs/common.h index c336383d..5d320764 100644 --- a/src/google/protobuf/stubs/common.h +++ b/src/google/protobuf/stubs/common.h @@ -101,27 +101,27 @@ 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 3005001 +#define GOOGLE_PROTOBUF_VERSION 3006000 // A suffix string for alpha, beta or rc releases. Empty for stable releases. #define GOOGLE_PROTOBUF_VERSION_SUFFIX "" // The minimum library version which works with the current version of the // headers. -#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION 3005000 +#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION 3006000 // The minimum header version which works with the current version of // the library. This constant should only be used by protoc's C++ code // generator. -static const int kMinHeaderVersionForLibrary = 3005000; +static const int kMinHeaderVersionForLibrary = 3006000; // The minimum protoc version which works with the current version of the // headers. -#define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 3005000 +#define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 3006000 // The minimum header version which works with the current version of // protoc. This constant should only be used in VerifyVersion(). -static const int kMinHeaderVersionForProtoc = 3005000; +static const int kMinHeaderVersionForProtoc = 3006000; // Verifies that the headers and libraries are compatible. Use the macro // below to call this. diff --git a/src/google/protobuf/timestamp.pb.h b/src/google/protobuf/timestamp.pb.h index f73e75b3..daea80f6 100644 --- a/src/google/protobuf/timestamp.pb.h +++ b/src/google/protobuf/timestamp.pb.h @@ -8,12 +8,12 @@ #include <google/protobuf/stubs/common.h> -#if GOOGLE_PROTOBUF_VERSION < 3005000 +#if GOOGLE_PROTOBUF_VERSION < 3006000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3005001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3006000 < 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 69af6c2e..cbd0cdcc 100644 --- a/src/google/protobuf/type.pb.h +++ b/src/google/protobuf/type.pb.h @@ -8,12 +8,12 @@ #include <google/protobuf/stubs/common.h> -#if GOOGLE_PROTOBUF_VERSION < 3005000 +#if GOOGLE_PROTOBUF_VERSION < 3006000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3005001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3006000 < 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 9f51a062..b00d4ea9 100644 --- a/src/google/protobuf/wrappers.pb.h +++ b/src/google/protobuf/wrappers.pb.h @@ -8,12 +8,12 @@ #include <google/protobuf/stubs/common.h> -#if GOOGLE_PROTOBUF_VERSION < 3005000 +#if GOOGLE_PROTOBUF_VERSION < 3006000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3005001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3006000 < 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. |