Only allow direct use of messages that share the same default_pool instance.
There's no guarantee of API/ABI equivalence across .so boundaries, so ensuring
the default_pool() instance is the same pointer is probably as close as we can
achieve right now. Ideally there would be a mechanism to ensure that PyProto_API
uses the same generated_pool(), but GetDefaultDescriptorPool() returns a
DescriptorPool where generated_pool() is an underlay and inaccessible.
In light of this, modify the compatibility checks for concrete C++ messages to
remove PyCompatibleDescriptor and impose a few more restrictions on concrete
message types.
In addition to the new changes, this is a partial rollback of
commit 32365371e06337083893addb166e45a12d7c6a6e
commit 30f02dd9ccd2fc7046c36ed913ed510fd1aa7301
Specifically the PyPinDescriptorPool and PyCompatibleDescriptor.
Only allow direct use of messages that share the same default_pool instance.
There's no guarantee of API/ABI equivalence across .so boundaries, so ensuring the default_pool() instance is the same pointer is probably as close as we can achieve right now. Ideally there would be a mechanism to ensure that PyProto_API uses the same generated_pool(), but GetDefaultDescriptorPool() returns a DescriptorPool where generated_pool() is an underlay and inaccessible.
In light of this, modify the compatibility checks for concrete C++ messages to remove PyCompatibleDescriptor and impose a few more restrictions on concrete message types.
In addition to the new changes, this is a partial rollback of commit 32365371e06337083893addb166e45a12d7c6a6e commit 30f02dd9ccd2fc7046c36ed913ed510fd1aa7301
Specifically the PyPinDescriptorPool and PyCompatibleDescriptor.