lawrence_danna marked an inline comment as done.
lawrence_danna added inline comments.
================
Comment at:
lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp:1258-1265
+ // you must check PyErr_Occurred() after calling this constructor.
+ PythonBuffer(PythonObject &obj, int flags = PyBUF_SIMPLE)
+ : m_buffer({}), m_error(Error::success()) {
+ PyObject_GetBuffer(obj.get(), &m_buffer, flags);
+ if (!m_buffer.obj) {
+ m_error = llvm::make_error<PythonException>();
+ }
----------------
labath wrote:
> Storing the Error as a member is quite unusual. It would be better to have a
> factory function which returns Expected<PythonBuffer>.
Oh yea I’ll fix that
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68188/new/
https://reviews.llvm.org/D68188
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits