Skip to content

Commit 82c4167

Browse files
pybind11_protobuf authorscopybara-github
authored andcommitted
Internal changes
PiperOrigin-RevId: 786269378
1 parent 87ec9af commit 82c4167

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pybind11_protobuf/proto_cast_util.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,8 @@ class PythonDescriptorPoolWrapper {
418418
bool CopyToFileDescriptorProto(py::handle py_file_descriptor,
419419
FileDescriptorProto* output) {
420420

421-
return output->ParsePartialFromString(
422-
PyBytesAsStringView(py_file_descriptor.attr("serialized_pb")));
421+
return output->ParsePartialFromString(std::string(
422+
PyBytesAsStringView(py_file_descriptor.attr("serialized_pb"))));
423423
}
424424

425425
py::object pool_; // never dereferenced.

0 commit comments

Comments
 (0)