mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	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().
This commit is contained in:
		
							parent
							
								
									ffe2395777
								
							
						
					
					
						commit
						81b092d0e6
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -185,7 +185,7 @@ gen_del(PyObject *self)
 | 
				
			||||||
                _Py_NewReference(self);
 | 
					                _Py_NewReference(self);
 | 
				
			||||||
                self->ob_refcnt = refcnt;
 | 
					                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);
 | 
					               _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so
 | 
					        /* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue