diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2014-07-08 22:43:23 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2014-07-08 22:43:23 (GMT) |
commit | 667f545e0378dec6b66fc4a21976eb98695ba662 (patch) | |
tree | 795aaccd879eb80798865d4a87ddcd8773858f56 /Objects/genobject.c | |
parent | b44fc3266121695462488777fa28cb552567eaed (diff) | |
download | cpython-667f545e0378dec6b66fc4a21976eb98695ba662.zip cpython-667f545e0378dec6b66fc4a21976eb98695ba662.tar.gz cpython-667f545e0378dec6b66fc4a21976eb98695ba662.tar.bz2 |
Issue #21938: simplify gen_iternext()
Diffstat (limited to 'Objects/genobject.c')
-rw-r--r-- | Objects/genobject.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Objects/genobject.c b/Objects/genobject.c index 831b15d..4be739a 100644 --- a/Objects/genobject.c +++ b/Objects/genobject.c @@ -377,11 +377,7 @@ failed_throw: 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); } /* |