summaryrefslogtreecommitdiff
path: root/Python/symtable.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2012-09-12 17:52:46 +0200
committerChristian Heimes <christian@cheimes.de>2012-09-12 17:52:46 +0200
commit65a0141e146aba6e2ae2b82d39d016ab03b8c7e2 (patch)
tree9b92a49bfb746227fe16225eb6ccc979ccef0815 /Python/symtable.c
parent9f2cc6c3903d588466d2dbfe2e6d25656e8501d4 (diff)
downloadcpython-git-65a0141e146aba6e2ae2b82d39d016ab03b8c7e2.tar.gz
Partly revert ad3824a90261 and add comment about reference ownership
Diffstat (limited to 'Python/symtable.c')
-rw-r--r--Python/symtable.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/symtable.c b/Python/symtable.c
index f0f1d4d07d..7611b3db61 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;
}