File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -708,15 +708,12 @@ _PyCodec_IgnoreError(PyObject *exc, int as_bytes)
708708
709709PyObject  * PyCodec_IgnoreErrors (PyObject  * exc )
710710{
711-     if  (_PyIsUnicodeEncodeError (exc )) {
711+     if  (_PyIsUnicodeEncodeError (exc )  ||   _PyIsUnicodeTranslateError ( exc ) ) {
712712        return  _PyCodec_IgnoreError (exc , false);
713713    }
714714    else  if  (_PyIsUnicodeDecodeError (exc )) {
715715        return  _PyCodec_IgnoreError (exc , true);
716716    }
717-     else  if  (_PyIsUnicodeTranslateError (exc )) {
718-         return  _PyCodec_IgnoreError (exc , false);
719-     }
720717    else  {
721718        wrong_exception_type (exc );
722719        return  NULL ;
@@ -1394,7 +1391,8 @@ PyCodec_SurrogateEscapeErrors(PyObject *exc)
13941391
13951392// --- Codecs registry handlers ----------------------------------------------- 
13961393
1397- static  PyObject  * strict_errors (PyObject  * self , PyObject  * exc )
1394+ static  inline  PyObject  * 
1395+ strict_errors (PyObject  * Py_UNUSED (self ), PyObject  * exc )
13981396{
13991397    return  PyCodec_StrictErrors (exc );
14001398}
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments