@@ -8993,10 +8993,10 @@ os_write_impl(PyObject *module, int fd, Py_buffer *data)
89938993
89948994#ifdef HAVE_SENDFILE
89958995PyDoc_STRVAR (posix_sendfile__doc__ ,
8996- "sendfile(out, in , offset, count) -> byteswritten\n\
8997- sendfile(out, in , offset, count[, headers][, trailers], flags=0)\n\
8996+ "sendfile(out_fd, in_fd , offset, count) -> byteswritten\n\
8997+ sendfile(out_fd, in_fd , offset, count[, headers][, trailers], flags=0)\n\
89988998 -> byteswritten\n\
8999- Copy count bytes from file descriptor in to file descriptor out ." );
8999+ Copy count bytes from file descriptor in_fd to file descriptor out_fd ." );
90009000
90019001/* AC 3.5: don't bother converting, has optional group*/
90029002static PyObject *
@@ -9016,8 +9016,7 @@ posix_sendfile(PyObject *self, PyObject *args, PyObject *kwdict)
90169016 off_t sbytes ;
90179017 struct sf_hdtr sf ;
90189018 int flags = 0 ;
9019- /* Beware that "in" clashes with Python's own "in" operator keyword */
9020- static char * keywords [] = {"out" , "in" ,
9019+ static char * keywords [] = {"out_fd" , "in_fd" ,
90219020 "offset" , "count" ,
90229021 "headers" , "trailers" , "flags" , NULL };
90239022
@@ -9133,7 +9132,7 @@ posix_sendfile(PyObject *self, PyObject *args, PyObject *kwdict)
91339132#else
91349133 Py_ssize_t count ;
91359134 PyObject * offobj ;
9136- static char * keywords [] = {"out " , "in " ,
9135+ static char * keywords [] = {"out_fd " , "in_fd " ,
91379136 "offset" , "count" , NULL };
91389137 if (!PyArg_ParseTupleAndKeywords (args , kwdict , "iiOn:sendfile" ,
91399138 keywords , & out , & in , & offobj , & count ))
@@ -9170,22 +9169,22 @@ posix_sendfile(PyObject *self, PyObject *args, PyObject *kwdict)
91709169/*[clinic input]
91719170os._fcopyfile
91729171
9173- infd : int
9174- outfd : int
9172+ in_fd : int
9173+ out_fd : int
91759174 flags: int
91769175 /
91779176
91789177Efficiently copy content or metadata of 2 regular file descriptors (macOS).
91799178[clinic start generated code]*/
91809179
91819180static PyObject *
9182- os__fcopyfile_impl (PyObject * module , int infd , int outfd , int flags )
9183- /*[clinic end generated code: output=8e8885c721ec38e3 input=69e0770e600cb44f ]*/
9181+ os__fcopyfile_impl (PyObject * module , int in_fd , int out_fd , int flags )
9182+ /*[clinic end generated code: output=c9d1a35a992e401b input=1e34638a86948795 ]*/
91849183{
91859184 int ret ;
91869185
91879186 Py_BEGIN_ALLOW_THREADS
9188- ret = fcopyfile (infd , outfd , NULL , flags );
9187+ ret = fcopyfile (in_fd , out_fd , NULL , flags );
91899188 Py_END_ALLOW_THREADS
91909189 if (ret < 0 )
91919190 return posix_error ();
0 commit comments