summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/scripts/Python')
-rw-r--r--lldb/scripts/Python/python-typemaps.swig5
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/scripts/Python/python-typemaps.swig b/lldb/scripts/Python/python-typemaps.swig
index ad8569a7cd9..9921c485162 100644
--- a/lldb/scripts/Python/python-typemaps.swig
+++ b/lldb/scripts/Python/python-typemaps.swig
@@ -552,6 +552,11 @@
File file($1, false);
PythonFile py_file(file, mode);
$result = py_file.release();
+ if (!$result)
+ {
+ $result = Py_None;
+ Py_INCREF(Py_None);
+ }
}
%typemap(in) (const char* string, int len) {
OpenPOWER on IntegriCloud