mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	gh-125703: Correctly honour tracemalloc hooks on more PyDECREF specialized paths (#125712)
This commit is contained in:
		
							parent
							
								
									5989eb7446
								
							
						
					
					
						commit
						3d1df3d84e
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		|  | @ -99,6 +99,11 @@ | ||||||
|         } \ |         } \ | ||||||
|         _Py_DECREF_STAT_INC(); \ |         _Py_DECREF_STAT_INC(); \ | ||||||
|         if (--op->ob_refcnt == 0) { \ |         if (--op->ob_refcnt == 0) { \ | ||||||
|  |             struct _reftracer_runtime_state *tracer = &_PyRuntime.ref_tracer; \ | ||||||
|  |             if (tracer->tracer_func != NULL) { \ | ||||||
|  |                 void* data = tracer->tracer_data; \ | ||||||
|  |                 tracer->tracer_func(op, PyRefTracer_DESTROY, data); \ | ||||||
|  |             } \ | ||||||
|             destructor d = (destructor)(dealloc); \ |             destructor d = (destructor)(dealloc); \ | ||||||
|             d(op); \ |             d(op); \ | ||||||
|         } \ |         } \ | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Pablo Galindo Salgado
						Pablo Galindo Salgado