Skip to content

Commit a6ffa81

Browse files
author
tim.peters
committed
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(). git-svn-id: http://svn.python.org/projects/python/trunk@45447 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 9d1128c commit a6ffa81

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/genobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ gen_del(PyObject *self)
185185
_Py_NewReference(self);
186186
self->ob_refcnt = refcnt;
187187
}
188-
assert(!PyType_IS_GC(self->ob_type) ||
188+
assert(PyType_IS_GC(self->ob_type) &&
189189
_Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
190190

191191
/* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so

0 commit comments

Comments
 (0)