diff options
Diffstat (limited to 'python/google/protobuf/pyext/extension_dict.h')
-rw-r--r-- | python/google/protobuf/pyext/extension_dict.h | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/python/google/protobuf/pyext/extension_dict.h b/python/google/protobuf/pyext/extension_dict.h index 0de2c4ee..a7d6bb7b 100644 --- a/python/google/protobuf/pyext/extension_dict.h +++ b/python/google/protobuf/pyext/extension_dict.h @@ -51,23 +51,8 @@ namespace python { typedef struct ExtensionDict { PyObject_HEAD; - // This is the top-level C++ Message object that owns the whole - // proto tree. Every Python container class holds a - // reference to it in order to keep it alive as long as there's a - // Python object that references any part of the tree. - CMessage::OwnerRef owner; - - // Weak reference to parent message. Used to make sure - // the parent is writable when an extension field is modified. + // Strong, owned reference to the parent message. Never NULL. CMessage* parent; - - // Pointer to the C++ Message that this ExtensionDict extends. - // Not owned by us. - Message* message; - - // A dict of child messages, indexed by Extension descriptors. - // Similar to CMessage::composite_fields. - PyObject* values; } ExtensionDict; extern PyTypeObject ExtensionDict_Type; @@ -80,6 +65,6 @@ ExtensionDict* NewExtensionDict(CMessage *parent); } // namespace extension_dict } // namespace python } // namespace protobuf - } // namespace google + #endif // GOOGLE_PROTOBUF_PYTHON_CPP_EXTENSION_DICT_H__ |