pybind / pybind11_protobuf

Pybind11 bindings for Google's Protocol Buffers
Other
54 stars 33 forks source link

Remove two pool-membership conditions guarding the C++ equivalent of `obj.SerializePartialToString()` #142

Closed copybara-service[bot] closed 8 months ago

copybara-service[bot] commented 8 months ago

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 other changes in this CL are secondary: small-scale refactoring, slight naming changes, additional tests for error conditions.