summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2006-04-15 22:59:10 (GMT)
committerTim Peters <tim.peters@gmail.com>2006-04-15 22:59:10 (GMT)
commit81b092d0e60db093c8ed2637deea545cb1de471a (patch)
tree86009d8d2cd5417b91d106cfb9031e066f7ab29f /Objects
parentffe23957770437ff7ce223c1790b8eb9c7b82800 (diff)
downloadcpython-81b092d0e60db093c8ed2637deea545cb1de471a.zip
cpython-81b092d0e60db093c8ed2637deea545cb1de471a.tar.gz
cpython-81b092d0e60db093c8ed2637deea545cb1de471a.tar.bz2
gen_del(): Looks like much this was copy/pasted from
slot_tp_del(), but while the latter had to cater to types that don't participate in GC, we know that generators do. That allows strengthing an assert().
Diffstat (limited to 'Objects')
-rw-r--r--Objects/genobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/genobject.c b/Objects/genobject.c
index a00aa85..15e53dd 100644
--- a/Objects/genobject.c
+++ b/Objects/genobject.c
@@ -185,7 +185,7 @@ gen_del(PyObject *self)
_Py_NewReference(self);
self->ob_refcnt = refcnt;
}
- assert(!PyType_IS_GC(self->ob_type) ||
+ assert(PyType_IS_GC(self->ob_type) &&
_Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
/* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so