aboutsummaryrefslogtreecommitdiffhomepage
path: root/python/google/protobuf/pyext/descriptor_pool.h
diff options
context:
space:
mode:
authorGravatar Jisi Liu <jisi.liu@gmail.com>2016-04-28 14:34:59 -0700
committerGravatar Jisi Liu <jisi.liu@gmail.com>2016-04-28 14:34:59 -0700
commitcf14183bcd5485b4a71541599ddce0b35eb71352 (patch)
tree12f6e5eb731d7a70cdac4cdafc8b3131629413e2 /python/google/protobuf/pyext/descriptor_pool.h
parentf00300d7f04f1c38a7d70e271f9232b94dd0e326 (diff)
Down integrate from Google internal.
Diffstat (limited to 'python/google/protobuf/pyext/descriptor_pool.h')
-rw-r--r--python/google/protobuf/pyext/descriptor_pool.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/python/google/protobuf/pyext/descriptor_pool.h b/python/google/protobuf/pyext/descriptor_pool.h
index 16bc910c..2a42c112 100644
--- a/python/google/protobuf/pyext/descriptor_pool.h
+++ b/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.