aboutsummaryrefslogtreecommitdiff
path: root/python/google/protobuf/pyext/message_factory.cc
diff options
context:
space:
mode:
Diffstat (limited to 'python/google/protobuf/pyext/message_factory.cc')
-rw-r--r--python/google/protobuf/pyext/message_factory.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/python/google/protobuf/pyext/message_factory.cc b/python/google/protobuf/pyext/message_factory.cc
index bacc76a6..efaa2617 100644
--- a/python/google/protobuf/pyext/message_factory.cc
+++ b/python/google/protobuf/pyext/message_factory.cc
@@ -28,6 +28,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#include <unordered_map>
+
#include <Python.h>
#include <google/protobuf/dynamic_message.h>
@@ -137,7 +139,7 @@ CMessageClass* GetOrCreateMessageClass(PyMessageFactory* self,
// This is the same implementation as MessageFactory.GetPrototype().
// Do not create a MessageClass that already exists.
- hash_map<const Descriptor*, CMessageClass*>::iterator it =
+ std::unordered_map<const Descriptor*, CMessageClass*>::iterator it =
self->classes_by_descriptor->find(descriptor);
if (it != self->classes_by_descriptor->end()) {
Py_INCREF(it->second);
@@ -158,7 +160,7 @@ CMessageClass* GetOrCreateMessageClass(PyMessageFactory* self,
return NULL;
}
ScopedPyObjectPtr message_class(PyObject_CallObject(
- reinterpret_cast<PyObject*>(&CMessageClass_Type), args.get()));
+ reinterpret_cast<PyObject*>(CMessageClass_Type), args.get()));
if (message_class == NULL) {
return NULL;
}