diff Python/symtable.c @ 79006:2888356cdd4e 3.2

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 ad3824a90261
children 99ab7006e466 c1b950541e46
line wrap: on
line diff
--- a/Python/symtable.c	Wed Sep 12 15:31:43 2012 +0200
+++ b/Python/symtable.c	Wed Sep 12 17:52:46 2012 +0200
@@ -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;
 }