aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/dynamic_message.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/dynamic_message.h')
-rw-r--r--src/google/protobuf/dynamic_message.h12
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__