summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2006-04-15 22:33:13 (GMT)
committerThomas Wouters <thomas@python.org>2006-04-15 22:33:13 (GMT)
commitb3deb94dc6fab592a825811e8a985fd2d8bbe2b4 (patch)
treeb6bb9e2f3d47d72c02886dc827c25a32b655e3dc /Modules
parentc6e55068cad6f2178981eec4f0a0a583b8bba21a (diff)
downloadcpython-b3deb94dc6fab592a825811e8a985fd2d8bbe2b4.zip
cpython-b3deb94dc6fab592a825811e8a985fd2d8bbe2b4.tar.gz
cpython-b3deb94dc6fab592a825811e8a985fd2d8bbe2b4.tar.bz2
Add missing PyObject_GC_Track call, causing *some* itertools.tee objects to
not be tracked by GC. This fixes 254 of test_generators' refleaks on my machine, but I'm sure something else will make them come back :> Not adding a separate test for this kind of cycle, since the existing fib/m235 already test them in more extensive ways than any 'minimal' test has been able to manage.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/itertoolsmodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c
index 71081fb..94617a9 100644
--- a/Modules/itertoolsmodule.c
+++ b/Modules/itertoolsmodule.c
@@ -498,6 +498,7 @@ tee_copy(teeobject *to)
newto->dataobj = to->dataobj;
newto->index = to->index;
newto->weakreflist = NULL;
+ PyObject_GC_Track(newto);
return (PyObject *)newto;
}