Index: third_party/protobuf/python/google/protobuf/pyext/map_container.h |
diff --git a/third_party/protobuf/python/google/protobuf/pyext/map_container.h b/third_party/protobuf/python/google/protobuf/pyext/map_container.h |
index 615657b03b8df576bc0dbf9fce3333d79de65c92..fbd6713f7319da73e7c45e79c7940f00bb89526c 100644 |
--- a/third_party/protobuf/python/google/protobuf/pyext/map_container.h |
+++ b/third_party/protobuf/python/google/protobuf/pyext/map_container.h |
@@ -112,10 +112,16 @@ struct MessageMapContainer : public MapContainer { |
PyObject* message_dict; |
}; |
-bool InitMapContainers(); |
+#if PY_MAJOR_VERSION >= 3 |
+ extern PyObject *MessageMapContainer_Type; |
+ extern PyType_Spec MessageMapContainer_Type_spec; |
+ extern PyObject *ScalarMapContainer_Type; |
+ extern PyType_Spec ScalarMapContainer_Type_spec; |
+#else |
+ extern PyTypeObject MessageMapContainer_Type; |
+ extern PyTypeObject ScalarMapContainer_Type; |
+#endif |
-extern PyTypeObject* MessageMapContainer_Type; |
-extern PyTypeObject* ScalarMapContainer_Type; |
extern PyTypeObject MapIterator_Type; // Both map types use the same iterator. |
// Builds a MapContainer object, from a parent message and a |