================ @@ -1212,12 +1178,12 @@ class BinaryPythonFile : public PythonIOFile { num_bytes = 0; return Status(); } - auto pybuffer = PythonBuffer::Create(pybuffer_obj.get()); - if (!pybuffer) - // Cloning since the wrapped exception may still reference the PyThread. - return Status::FromError(pybuffer.takeError()).Clone(); - memcpy(buf, pybuffer.get().get().buf, pybuffer.get().get().len); - num_bytes = pybuffer.get().get().len; + PythonBytes pybytes(PyRefType::Borrowed, pybuffer_obj->get()); + if (!pybytes) + return Status::FromErrorString("not a byte array"); ---------------- bulbazord wrote:
This subtly changes behavior from raising a python exception to returning the string "not a byte array". Is that not a breaking change? https://github.com/llvm/llvm-project/pull/152031 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits