From eee38b0c018b3279f77d03dff796f440f40d3516 Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Sat, 22 Aug 2015 18:25:48 -0700 Subject: Down-integrate from google3. --- python/google/protobuf/pyext/descriptor_pool.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'python/google/protobuf/pyext/descriptor_pool.h') diff --git a/python/google/protobuf/pyext/descriptor_pool.h b/python/google/protobuf/pyext/descriptor_pool.h index efb1abeb..6f6c5cdb 100644 --- a/python/google/protobuf/pyext/descriptor_pool.h +++ b/python/google/protobuf/pyext/descriptor_pool.h @@ -38,6 +38,8 @@ namespace google { namespace protobuf { +class MessageFactory; + namespace python { // Wraps operations to the global DescriptorPool which contains information @@ -55,6 +57,14 @@ typedef struct PyDescriptorPool { DescriptorPool* pool; + // DynamicMessageFactory used to create C++ instances of messages. + // This object cache the descriptors that were used, so the DescriptorPool + // needs to get rid of it before it can delete itself. + // + // Note: A C++ MessageFactory is different from the Python MessageFactory. + // The C++ one creates messages, when the Python one creates classes. + MessageFactory* message_factory; + // Make our own mapping to retrieve Python classes from C++ descriptors. // // Descriptor pointers stored here are owned by the DescriptorPool above. -- cgit v1.2.3