[Python-checkins] cpython (3.2): Partly revert ad3824a90261 and add comment about reference ownership

christian.heimes python-checkins at python.org
Wed Sep 12 17:54:06 CEST 2012


http://hg.python.org/cpython/rev/2888356cdd4e
changeset: 79006:2888356cdd4e
branch: 3.2
parent: 79004:3d5db784821f
user: Christian Heimes <christian at cheimes.de>
date: Wed Sep 12 17:52:46 2012 +0200
summary:
 Partly revert ad3824a90261 and add comment about reference ownership
files:
 Python/symtable.c | 3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/Python/symtable.c b/Python/symtable.c
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -37,7 +37,7 @@
 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 @@
 
 return ste;
 fail:
- Py_XDECREF(k);
 Py_XDECREF(ste);
 return NULL;
 }
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /