summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/python-wrapper.swig
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2014-01-29 23:18:58 +0000
committerEnrico Granata <egranata@apple.com>2014-01-29 23:18:58 +0000
commit1ba73059744e514188d49e52c00804dbd47d20a1 (patch)
tree06849eda18cc8d562f1430b44a32f46136f3c15f /lldb/scripts/Python/python-wrapper.swig
parentb681918dddd205fc47e30c67c5350dd2fda2aa1a (diff)
downloadbcm5719-llvm-1ba73059744e514188d49e52c00804dbd47d20a1.tar.gz
bcm5719-llvm-1ba73059744e514188d49e52c00804dbd47d20a1.zip
<rdar://problem/15936507>
PyTuple_SetItem steals a reference to the item it inserts in the tuple This, plus the Py_XDECREF of the tuple a few lines below, causes our session dictionary to go away after the first time a SWIG layer function is called - with disastrous effects for the first subsequent attempt to use any functionality in ScriptInterpreterPython This fixes it llvm-svn: 200429
Diffstat (limited to 'lldb/scripts/Python/python-wrapper.swig')
-rw-r--r--lldb/scripts/Python/python-wrapper.swig1
1 files changed, 1 insertions, 0 deletions
diff --git a/lldb/scripts/Python/python-wrapper.swig b/lldb/scripts/Python/python-wrapper.swig
index d28f0cda110..75b082ffe0c 100644
--- a/lldb/scripts/Python/python-wrapper.swig
+++ b/lldb/scripts/Python/python-wrapper.swig
@@ -135,6 +135,7 @@ public:
{
if (!arg)
return retval;
+ Py_INCREF(arg); // _SetItem steals a reference
PyTuple_SetItem(pargs,idx,arg);
idx++;
}
OpenPOWER on IntegriCloud