mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 03:44:55 +00:00 
			
		
		
		
	os.sendfile(): on Linux if offset parameter is passed as NULL we were erroneously returning a (bytes_sent, None) tuple instead of bytes_sent
This commit is contained in:
		
							parent
							
								
									e8d2d2d2b2
								
							
						
					
					
						commit
						ff1a73590d
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		| 
						 | 
					@ -6450,8 +6450,7 @@ done:
 | 
				
			||||||
        Py_END_ALLOW_THREADS
 | 
					        Py_END_ALLOW_THREADS
 | 
				
			||||||
        if (ret < 0)
 | 
					        if (ret < 0)
 | 
				
			||||||
            return posix_error();
 | 
					            return posix_error();
 | 
				
			||||||
        Py_INCREF(Py_None);
 | 
					        return Py_BuildValue("n", ret);
 | 
				
			||||||
        return Py_BuildValue("nO", ret, Py_None);
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
    if (!_parse_off_t(offobj, &offset))
 | 
					    if (!_parse_off_t(offobj, &offset))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue