gen_throw(): The caller doesn't own PyArg_ParseTuple()
"O" arguments, so must not decref them. This accounts
for why running test_contextlib.test_main() in a loop
eventually tried to deallocate Py_None.
diff --git a/Objects/genobject.c b/Objects/genobject.c
index a3eae6a..7cec290 100644
--- a/Objects/genobject.c
+++ b/Objects/genobject.c
@@ -217,10 +217,8 @@
/* First, check the traceback argument, replacing None with
NULL. */
- if (tb == Py_None) {
- Py_DECREF(tb);
+ if (tb == Py_None)
tb = NULL;
- }
else if (tb != NULL && !PyTraceBack_Check(tb)) {
PyErr_SetString(PyExc_TypeError,
"throw() third argument must be a traceback object");