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)
commit65a0141e146aba6e2ae2b82d39d016ab03b8c7e2 (patch)
tree9b92a49bfb746227fe16225eb6ccc979ccef0815 /Python
parent9f2cc6c3903d588466d2dbfe2e6d25656e8501d4 (diff)
downloadcpython-65a0141e146aba6e2ae2b82d39d016ab03b8c7e2.zip
cpython-65a0141e146aba6e2ae2b82d39d016ab03b8c7e2.tar.gz
cpython-65a0141e146aba6e2ae2b82d39d016ab03b8c7e2.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 f0f1d4d..7611b3d 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -31,7 +31,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);
@@ -75,7 +75,6 @@ ste_new(struct symtable *st, identifier name, _Py_block_ty block,
return ste;
fail:
- Py_XDECREF(k);
Py_XDECREF(ste);
return NULL;
}