diff options
author | Enrico Granata <egranata@apple.com> | 2014-02-19 01:45:22 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2014-02-19 01:45:22 +0000 |
commit | bdab3dee8fe7a22808972e5a7957b8fd57b751a5 (patch) | |
tree | 8c7824baa72ff1ec5596adab5df4ca3414d55c66 /lldb/source/Interpreter/PythonDataObjects.cpp | |
parent | b9ea63c551f667af119cce25e1b5a59b8bbe8091 (diff) | |
download | bcm5719-llvm-bdab3dee8fe7a22808972e5a7957b8fd57b751a5.tar.gz bcm5719-llvm-bdab3dee8fe7a22808972e5a7957b8fd57b751a5.zip |
<rdar://problem/15906684>
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
Diffstat (limited to 'lldb/source/Interpreter/PythonDataObjects.cpp')
-rw-r--r-- | lldb/source/Interpreter/PythonDataObjects.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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 //---------------------------------------------------------------------- |