Skip to content

Commit

Permalink
Issue python#21938: simplify gen_iternext()
Browse files Browse the repository at this point in the history
  • Loading branch information
pitrou committed Jul 8, 2014
1 parent b44fc32 commit 667f545
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Objects/genobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,7 @@ gen_throw(PyGenObject *gen, PyObject *args)
static PyObject *
gen_iternext(PyGenObject *gen)
{
PyObject *val = NULL;
PyObject *ret;
ret = gen_send_ex(gen, val, 0);
Py_XDECREF(val);
return ret;
return gen_send_ex(gen, NULL, 0);
}

/*
Expand Down

0 comments on commit 667f545

Please sign in to comment.