mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 07:31:38 +00:00 
			
		
		
		
	err_ovf(): only raise OverflowError when OverflowWarning was raised.
This commit is contained in:
		
							parent
							
								
									31960db5a5
								
							
						
					
					
						commit
						0b13116a62
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -27,7 +27,8 @@ static int
 | 
			
		|||
err_ovf(char *msg)
 | 
			
		||||
{
 | 
			
		||||
	if (PyErr_Warn(PyExc_OverflowWarning, msg) < 0) {
 | 
			
		||||
		PyErr_SetString(PyExc_OverflowError, msg);
 | 
			
		||||
		if (PyErr_ExceptionMatches(PyExc_OverflowWarning))
 | 
			
		||||
			PyErr_SetString(PyExc_OverflowError, msg);
 | 
			
		||||
		return 1;
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue