mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	Issue #19437: Fix datetime_subtract(), handle new_delta() failure
This commit is contained in:
		
							parent
							
								
									aa5bbfaa77
								
							
						
					
					
						commit
						70e11acdbd
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		|  | @ -4462,6 +4462,9 @@ datetime_subtract(PyObject *left, PyObject *right) | |||
|             delta_us = DATE_GET_MICROSECOND(left) - | ||||
|                        DATE_GET_MICROSECOND(right); | ||||
|             result = new_delta(delta_d, delta_s, delta_us, 1); | ||||
|             if (result == NULL) | ||||
|                 return NULL; | ||||
| 
 | ||||
|             if (offdiff != NULL) { | ||||
|                 PyObject *temp = result; | ||||
|                 result = delta_subtract(result, offdiff); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner