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
commitc99ce12e0b7abb2b188c0577598abac5d5e69cfe (patch)
tree944abd8309c28349dddb1b77a5ab6e0ecddbd79e /Python/symtable.c
parentb8d7deac1625447daac98693b2b0259b6e319633 (diff)
downloadcpython-c99ce12e0b7abb2b188c0577598abac5d5e69cfe.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 00b342761f..992b5aeb58 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;
}