From bdab3dee8fe7a22808972e5a7957b8fd57b751a5 Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Wed, 19 Feb 2014 01:45:22 +0000 Subject: The way in which we were determining whether a python module had already been imported in the current session stopped working due to the IOHandler changes As a result, importing in a new debug session a module which had been imported in a previous session did not work This commit restores that functionality by checking for the module's presence in the session dictionary (which should be more correct anyway) llvm-svn: 201623 --- lldb/source/Interpreter/PythonDataObjects.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lldb/source/Interpreter/PythonDataObjects.cpp') diff --git a/lldb/source/Interpreter/PythonDataObjects.cpp b/lldb/source/Interpreter/PythonDataObjects.cpp index 01f2754a2cc..053ff34b9d7 100644 --- a/lldb/source/Interpreter/PythonDataObjects.cpp +++ b/lldb/source/Interpreter/PythonDataObjects.cpp @@ -84,6 +84,12 @@ PythonObject::Str () return PythonString(str); } +bool +PythonObject::IsNULLOrNone () const +{ + return ((m_py_obj == nullptr) || (m_py_obj == Py_None)); +} + //---------------------------------------------------------------------- // PythonString //---------------------------------------------------------------------- -- cgit v1.2.3