[Lldb-commits] [PATCH] D68188: allow arbitrary python streams to be converted to SBFile
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 9 11:45:24 PDT 2019
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
More information about the lldb-commits
mailing list