diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2018-08-08 17:00:41 -0700 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2018-08-08 17:00:41 -0700 |
commit | 6bbe197e9c1b6fc38cbdc45e3bf83fa7ced792a3 (patch) | |
tree | e575738adf52d24b883cca5e8928a5ded31caba1 /src/google/protobuf/dynamic_message.h | |
parent | e7746f487cb9cca685ffb1b3d7dccc5554b618a4 (diff) | |
download | protobuf-6bbe197e9c1b6fc38cbdc45e3bf83fa7ced792a3.tar.gz protobuf-6bbe197e9c1b6fc38cbdc45e3bf83fa7ced792a3.tar.bz2 protobuf-6bbe197e9c1b6fc38cbdc45e3bf83fa7ced792a3.zip |
Down-integrate from google3.
Diffstat (limited to 'src/google/protobuf/dynamic_message.h')
-rw-r--r-- | src/google/protobuf/dynamic_message.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/google/protobuf/dynamic_message.h b/src/google/protobuf/dynamic_message.h index 940d5e15..c614ee5a 100644 --- a/src/google/protobuf/dynamic_message.h +++ b/src/google/protobuf/dynamic_message.h @@ -43,9 +43,13 @@ #include <vector> #include <google/protobuf/message.h> +#include <google/protobuf/stubs/mutex.h> #include <google/protobuf/repeated_field.h> #include <google/protobuf/stubs/common.h> -#include <google/protobuf/stubs/mutex.h> + +#ifdef SWIG +#error "You cannot SWIG proto headers" +#endif namespace google { namespace protobuf { @@ -121,14 +125,14 @@ class LIBPROTOBUF_EXPORT DynamicMessageFactory : public MessageFactory { const DescriptorPool* pool_; bool delegate_to_generated_factory_; - // This struct just contains a hash_map. We can't #include <google/protobuf/stubs/hash.h> from + // This struct just contains a hash_map. We can't #include <hash_map> from // this header due to hacks needed for hash_map portability in the open source // release. Namely, stubs/hash.h, which defines hash_map portably, is not a // public header (for good reason), but dynamic_message.h is, and public // headers may only #include other public headers. struct PrototypeMap; std::unique_ptr<PrototypeMap> prototypes_; - mutable Mutex prototypes_mutex_; + mutable internal::WrappedMutex prototypes_mutex_; friend class DynamicMessage; const Message* GetPrototypeNoLock(const Descriptor* type); @@ -228,6 +232,6 @@ class LIBPROTOBUF_EXPORT DynamicMapSorter { }; } // namespace protobuf - } // namespace google + #endif // GOOGLE_PROTOBUF_DYNAMIC_MESSAGE_H__ |