<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
This commit is contained in:
Enrico Granata 2014-01-29 23:18:58 +00:00
parent b681918ddd
commit 1ba7305974
1 changed files with 1 additions and 0 deletions

View File

@ -135,6 +135,7 @@ public:
{
if (!arg)
return retval;
Py_INCREF(arg); // _SetItem steals a reference
PyTuple_SetItem(pargs,idx,arg);
idx++;
}