Mercurial > cpython-lru_cache-weakref
diff Python/symtable.c @ 79008:f19b84915c17 2.7
Partly revert ad3824a90261 and add comment about reference ownership
| author | Christian Heimes <christian@cheimes.de> |
|---|---|
| date | Wed, 12 Sep 2012 17:52:46 +0200 |
| parents | 61446e56f683 |
| children | 128fa8755e55 |
line wrap: on
line diff
--- a/Python/symtable.c Tue Sep 11 22:16:58 2012 -0700 +++ b/Python/symtable.c Wed Sep 12 17:52:46 2012 +0200 @@ -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; }
