summaryrefslogtreecommitdiffstats
path: root/Objects/abstract.c
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2009-01-12 23:36:55 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2009-01-12 23:36:55 (GMT)
commita40d57366432cd65915b92fe3e6bfe1d5ad63be0 (patch)
tree45ef11eae7d47a373fea86cba4b1b0c4902bb93a /Objects/abstract.c
parentf94d7fa5fb90df0163cffca2864885a7da49d4f6 (diff)
downloadcpython-a40d57366432cd65915b92fe3e6bfe1d5ad63be0.zip
cpython-a40d57366432cd65915b92fe3e6bfe1d5ad63be0.tar.gz
cpython-a40d57366432cd65915b92fe3e6bfe1d5ad63be0.tar.bz2
#3720: Interpreter crashes when an evil iterator removes its own next function.
Now the slot is filled with a function that always raises. Will not backport: extensions compiled with 2.6.x would not run on 2.6.0.
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r--Objects/abstract.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 956c4f4..80a1289 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -3067,7 +3067,6 @@ PyObject *
PyIter_Next(PyObject *iter)
{
PyObject *result;
- assert(PyIter_Check(iter));
result = (*iter->ob_type->tp_iternext)(iter);
if (result == NULL &&
PyErr_Occurred() &&