summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2012-09-12 15:52:46 (GMT)
committerChristian Heimes <christian@cheimes.de>2012-09-12 15:52:46 (GMT)
commit1526582df686a66e15c1944aed13c2ea6b922882 (patch)
treea491fff5cb3c2bb75e95cf83c3fc196fd2b37119 /Python
parent79b97ee2ab2620921d409ed4010e84f6c227b470 (diff)
downloadcpython-1526582df686a66e15c1944aed13c2ea6b922882.zip
cpython-1526582df686a66e15c1944aed13c2ea6b922882.tar.gz
cpython-1526582df686a66e15c1944aed13c2ea6b922882.tar.bz2
Partly revert ad3824a90261 and add comment about reference ownership
Diffstat (limited to 'Python')
-rw-r--r--Python/symtable.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/symtable.c b/Python/symtable.c
index 00b3427..992b5ae 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -37,7 +37,7 @@ ste_new(struct symtable *st, identifier name, _Py_block_ty block,
if (ste == NULL)
goto fail;
ste->ste_table = st;
- ste->ste_id = k;
+ ste->ste_id = k; /* ste owns reference to k */
ste->ste_name = name;
Py_INCREF(name);
@@ -83,7 +83,6 @@ ste_new(struct symtable *st, identifier name, _Py_block_ty block,
return ste;
fail:
- Py_XDECREF(k);
Py_XDECREF(ste);
return NULL;
}