-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove two pool-membership conditions guarding the C++ equivalent of …
…`obj.SerializePartialToString()` The main change in this CL is to remove two conditions in `PyProtoIsCompatible()`: 1. ``` if (descriptor->file()->pool() != DescriptorPool::generated_pool()) { ``` 2. ``` return py_pool->is(GlobalState::instance()->global_pool()); ``` Rationale for removing these conditions: * All that matters for protobuf compatibility is that the `full_name` is the same. (Thanks @kmoffett for that insight!) * Cross-extension-module ABI compatibility is not a concern because only the Python API is used in the relevant code paths serializing Python protobuf objects to Python `bytes` (equivalent to calling `obj.SerializePartialToString()` from Python). All other changes in this CL are secondary: small-scale refactoring, slight naming changes, additional tests for error conditions. PiperOrigin-RevId: 589898116
- Loading branch information
1 parent
b713501
commit 8359a09
Showing
4 changed files
with
103 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters