mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Partly revert ad3824a90261 and add comment about reference ownership
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user