labath accepted this revision.
labath added inline comments.
This revision is now accepted and ready to land.
================
Comment at:
lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp:1284
+ PythonBuffer(PythonObject &obj, int flags) : m_buffer({}) {
+ PyObject_GetBuffer(obj.get(), &m_buffer, flags);
+ }
----------------
I would slightly prefer if the PyObject_GetBuffer happened in the Create
function (and the constructor took an already-constructed Py_buffer). That way,
the call is next to the exception check and you avoid creating an "invalid"
PythonBuffer object, even as an implementation detail.
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