Index: third_party/protobuf/python/google/protobuf/pyext/descriptor_pool.h |
diff --git a/third_party/protobuf/python/google/protobuf/pyext/descriptor_pool.h b/third_party/protobuf/python/google/protobuf/pyext/descriptor_pool.h |
index 16bc910c45640ea607bf1e1e5fb29c9bd1d229f1..2a42c11262694451ac0a32fb7b9fafd1ede34392 100644 |
--- a/third_party/protobuf/python/google/protobuf/pyext/descriptor_pool.h |
+++ b/third_party/protobuf/python/google/protobuf/pyext/descriptor_pool.h |
@@ -42,6 +42,9 @@ class MessageFactory; |
namespace python { |
+// The (meta) type of all Messages classes. |
+struct CMessageClass; |
+ |
// Wraps operations to the global DescriptorPool which contains information |
// about all messages and fields. |
// |
@@ -78,7 +81,7 @@ typedef struct PyDescriptorPool { |
// |
// Descriptor pointers stored here are owned by the DescriptorPool above. |
// Python references to classes are owned by this PyDescriptorPool. |
- typedef hash_map<const Descriptor*, PyObject*> ClassesByMessageMap; |
+ typedef hash_map<const Descriptor*, CMessageClass*> ClassesByMessageMap; |
ClassesByMessageMap* classes_by_descriptor; |
// Cache the options for any kind of descriptor. |
@@ -101,14 +104,14 @@ const Descriptor* FindMessageTypeByName(PyDescriptorPool* self, |
// On error, returns -1 with a Python exception set. |
int RegisterMessageClass(PyDescriptorPool* self, |
const Descriptor* message_descriptor, |
- PyObject* message_class); |
+ CMessageClass* message_class); |
// Retrieves the Python class registered with the given message descriptor. |
// |
// Returns a *borrowed* reference if found, otherwise returns NULL with an |
// exception set. |
-PyObject* GetMessageClass(PyDescriptorPool* self, |
- const Descriptor* message_descriptor); |
+CMessageClass* GetMessageClass(PyDescriptorPool* self, |
+ const Descriptor* message_descriptor); |
// The functions below are also exposed as methods of the DescriptorPool type. |