From edc2def4a65764991ffb50e9c9af1c740ced534c Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Thu, 2 Nov 2017 02:43:27 +0000 Subject: Commit Lawrence D'Anna's patch to change SetOututFileHandle to work with IOBase. I did make one change after checking with Larry -- I renamed SBDebugger::Flush to FlushDebuggerOutputHandles and added a short docstring to the .i file to make it a little clearer under which context programs may need to use this API. Differential Revision: https://reviews.llvm.org/D39128 llvm-svn: 317182 --- lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h') diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h index beeb64782367..60e1337b7028 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h @@ -113,6 +113,8 @@ public: Reset(PyRefType::Borrowed, rhs.m_py_obj); } + operator PyObject*() const { return m_py_obj; } + // PythonObject is implicitly convertible to PyObject *, which will call the // wrong overload. We want to explicitly disallow this, since a PyObject // *always* owns its reference. Therefore the overload which takes a -- cgit v1.2.3