From 667f545e0378dec6b66fc4a21976eb98695ba662 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Tue, 8 Jul 2014 18:43:23 -0400 Subject: Issue #21938: simplify gen_iternext() --- Objects/genobject.c | 6 +----- 1 file changed, 1 insertion(+), 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); } /* -- cgit v0.12