mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-27 15:14:31 +00:00
<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:
1 parent
b681918ddd
commit
1ba7305974
1 file changed
+1
@@ -135,6 +135,7 @@ public:
|
||||
{
|
||||
if (!arg)
|
||||
return retval;
|
||||
Py_INCREF(arg); // _SetItem steals a reference
|
||||
PyTuple_SetItem(pargs,idx,arg);
|
||||
idx++;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user