This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Py_XDECREF statement in gen_iternext()
Type: enhancement Stage: resolved
Components: Interpreter Core Versions: Python 3.5
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: pitrou, python-dev, xdegaye
Priority: normal Keywords:

Created on 2014-07-08 11:02 by xdegaye, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg222556 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2014-07-08 11:01
The Py_XDECREF statement in gen_iternext() at Objects/genobject.c is not needed since val is NULL (may be optimized out by the compiler).
Actually, the whole function could be written as:

    return gen_send_ex(gen, NULL, 0);
msg222586 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-07-08 22:43
New changeset 5cfa919609a0 by Antoine Pitrou in branch 'default':
Issue #21938: simplify gen_iternext()
msg222587 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2014-07-08 22:44
Good point, thanks :)
Date User Action Args
2022-04-11 14:58:05adminsetgithub: 66137
2014-07-08 22:44:41pitrousetstatus: open -> closed

nosy: + pitrou
messages: + msg222587

resolution: fixed
stage: resolved
2014-07-08 22:43:55python-devsetnosy: + python-dev
messages: + msg222586
2014-07-08 11:02:00xdegayecreate