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

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


http://hg.python.org/cpython/rev/f19b84915c17
changeset: 79008:f19b84915c17
branch: 2.7
parent: 79003:befd752a3218
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
@@ -31,7 +31,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);
@@ -75,7 +75,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 によって変換されたページ (->オリジナル) /