Procházet zdrojové kódy

Merge branch 'sync-stage' of https://github.com/deannagarcia/protobuf into sync-stage

Deanna Garcia před 4 roky
rodič
revize
2ccf400b86

+ 1 - 0
cmake/libprotoc.cmake

@@ -93,6 +93,7 @@ set(libprotoc_headers
   ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_message.h
   ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_message_field.h
   ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_message_layout_helper.h
+  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_names.h
   ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_options.h
   ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.h
   ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_primitive_field.h

+ 2 - 2
python/setup.py

@@ -207,7 +207,7 @@ if __name__ == '__main__':
     # C++ projects must now migrate to libc++ and are recommended to set a
     # deployment target of macOS 10.9 or later, or iOS 7 or later.
     if sys.platform == 'darwin':
-      mac_target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')
+      mac_target = str(sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET'))
       if mac_target and (pkg_resources.parse_version(mac_target) <
                        pkg_resources.parse_version('10.9.0')):
         os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.9'
@@ -254,7 +254,7 @@ if __name__ == '__main__':
     os.environ['PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION'] = 'cpp'
 
   # Keep this list of dependencies in sync with tox.ini.
-  install_requires = ['six>=1.9', 'setuptools']
+  install_requires = ['six>=1.9']
   if sys.version_info <= (2,7):
     install_requires.append('ordereddict')
     install_requires.append('unittest2')

+ 1 - 0
src/Makefile.am

@@ -341,6 +341,7 @@ libprotoc_la_SOURCES =                                         \
   google/protobuf/compiler/cpp/cpp_message_field.cc            \
   google/protobuf/compiler/cpp/cpp_message_field.h             \
   google/protobuf/compiler/cpp/cpp_message_layout_helper.h     \
+  google/protobuf/compiler/cpp/cpp_names.h                     \
   google/protobuf/compiler/cpp/cpp_options.h                   \
   google/protobuf/compiler/cpp/cpp_padding_optimizer.cc        \
   google/protobuf/compiler/cpp/cpp_padding_optimizer.h         \

+ 1 - 1
src/google/protobuf/compiler/cpp/cpp_field.h

@@ -165,7 +165,7 @@ class FieldGenerator {
   }
 
   // Generate initialization code for private members declared by
-  // GeneratePrivateMembers(), specifically for the constexpr construtor.
+  // GeneratePrivateMembers(), specifically for the constexpr constructor.
   // These go into the constructor's initializer list and must follow that
   // syntax (eg `field_(args)`). Does not include `:` or `,` separators.
   virtual void GenerateConstinitInitializer(io::Printer* printer) const {}

+ 1 - 1
src/google/protobuf/generated_message_table_driven_lite.h

@@ -87,7 +87,7 @@ inline ExtensionSet* GetExtensionSet(MessageLite* msg, int64 extension_offset) {
 
 template <typename Type>
 inline Type* AddField(MessageLite* msg, int64 offset) {
-  static_assert(std::is_pod<Type>::value,
+  static_assert(std::is_standard_layout<Type>::value && std::is_trivial<Type>::value,
                 "Do not assign");
 
   RepeatedField<Type>* repeated = Raw<RepeatedField<Type>>(msg, offset);