summaryrefslogtreecommitdiff
path: root/scripts/Python/python-typemaps.swig
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Python/python-typemaps.swig')
-rw-r--r--scripts/Python/python-typemaps.swig3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/Python/python-typemaps.swig b/scripts/Python/python-typemaps.swig
index df16a6d27..29e5d9b15 100644
--- a/scripts/Python/python-typemaps.swig
+++ b/scripts/Python/python-typemaps.swig
@@ -102,7 +102,8 @@
%typemap(argout) (char *dst, size_t dst_len) {
Py_XDECREF($result); /* Blow away any previous result */
if (result == 0) {
- $result = Py_None;
+ lldb_private::PythonString string("");
+ $result = string.release();
Py_INCREF($result);
} else {
llvm::StringRef ref(static_cast<const char*>($1), result);