From 82c4167e160f5dfc0be13ca71ecdf19eb3a83cdf Mon Sep 17 00:00:00 2001 From: pybind11_protobuf authors Date: Wed, 23 Jul 2025 07:14:09 -0700 Subject: [PATCH] Internal changes PiperOrigin-RevId: 786269378 --- pybind11_protobuf/proto_cast_util.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pybind11_protobuf/proto_cast_util.cc b/pybind11_protobuf/proto_cast_util.cc index 2f5b314..cc83d67 100644 --- a/pybind11_protobuf/proto_cast_util.cc +++ b/pybind11_protobuf/proto_cast_util.cc @@ -418,8 +418,8 @@ class PythonDescriptorPoolWrapper { bool CopyToFileDescriptorProto(py::handle py_file_descriptor, FileDescriptorProto* output) { - return output->ParsePartialFromString( - PyBytesAsStringView(py_file_descriptor.attr("serialized_pb"))); + return output->ParsePartialFromString(std::string( + PyBytesAsStringView(py_file_descriptor.attr("serialized_pb")))); } py::object pool_; // never dereferenced.