diff options
Diffstat (limited to 'python/google/protobuf/pyext/descriptor_pool.h')
-rw-r--r-- | python/google/protobuf/pyext/descriptor_pool.h | 10 |
1 files changed, 10 insertions, 0 deletions
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. |