mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 07:31:38 +00:00 
			
		
		
		
	Ignore the references to the dummy objects used as deleted keys
in dicts and sets when computing the total number of references.
This commit is contained in:
		
							parent
							
								
									314fce92dd
								
							
						
					
					
						commit
						e170937af6
					
				
					 6 changed files with 40 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -604,10 +604,9 @@ sys_getrefcount(PyObject *self, PyObject *arg)
 | 
			
		|||
static PyObject *
 | 
			
		||||
sys_gettotalrefcount(PyObject *self)
 | 
			
		||||
{
 | 
			
		||||
	return PyInt_FromSsize_t(_Py_RefTotal);
 | 
			
		||||
	return PyInt_FromSsize_t(_Py_GetRefTotal());
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif /* Py_TRACE_REFS */
 | 
			
		||||
#endif /* Py_REF_DEBUG */
 | 
			
		||||
 | 
			
		||||
PyDoc_STRVAR(getrefcount_doc,
 | 
			
		||||
"getrefcount(object) -> integer\n\
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue