File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -2576,7 +2576,9 @@ _thread.set_name
25762576Set the name of the current thread. 
25772577[clinic start generated code]*/ 
25782578
2579- // Helper to set the thread name using platform-specific APIs 
2579+ 
2580+ #ifndef  MS_WINDOWS 
2581+ // Helper to set the thread name using platform-specific APIs (POSIX only) 
25802582static  int 
25812583_set_thread_name (const  char  * name )
25822584{
@@ -2596,18 +2598,18 @@ _set_thread_name(const char *name)
25962598#endif 
25972599    return  rc ;
25982600}
2601+ #endif  // !MS_WINDOWS 
2602+ 
25992603
26002604static  PyObject  * 
26012605_thread_set_name_impl (PyObject  * module , PyObject  * name_obj )
26022606/*[clinic end generated code: output=402b0c68e0c0daed input=7e7acd98261be82f]*/ 
26032607{
26042608#ifndef  MS_WINDOWS 
2609+     // POSIX and non-Windows platforms 
26052610#ifdef  __sun 
2606-     // Solaris always uses UTF-8 
26072611    const  char  * encoding  =  "utf-8" ;
26082612#else 
2609-     // Encode the thread name to the filesystem encoding using the "replace" 
2610-     // error handler 
26112613    PyInterpreterState  * interp  =  _PyInterpreterState_GET ();
26122614    const  char  * encoding  =  interp -> unicode .fs_codec .encoding ;
26132615#endif 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments