mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
os.sendfile(headers=None, trailers=None) arguments are not actually accepted
Needs to be tested on a BSD.
This commit is contained in:
parent
78d915aa3e
commit
9499413508
3 changed files with 5 additions and 5 deletions
|
@ -8246,7 +8246,7 @@ posix_write(PyObject *self, PyObject *args)
|
|||
#ifdef HAVE_SENDFILE
|
||||
PyDoc_STRVAR(posix_sendfile__doc__,
|
||||
"sendfile(out, in, offset, count) -> byteswritten\n\
|
||||
sendfile(out, in, offset, count, headers=None, trailers=None, flags=0)\n\
|
||||
sendfile(out, in, offset, count[, headers][, trailers], flags=0)\n\
|
||||
-> byteswritten\n\
|
||||
Copy count bytes from file descriptor in to file descriptor out.");
|
||||
|
||||
|
@ -8286,7 +8286,7 @@ posix_sendfile(PyObject *self, PyObject *args, PyObject *kwdict)
|
|||
if (headers != NULL) {
|
||||
if (!PySequence_Check(headers)) {
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"sendfile() headers must be a sequence or None");
|
||||
"sendfile() headers must be a sequence");
|
||||
return NULL;
|
||||
} else {
|
||||
Py_ssize_t i = 0; /* Avoid uninitialized warning */
|
||||
|
@ -8303,7 +8303,7 @@ posix_sendfile(PyObject *self, PyObject *args, PyObject *kwdict)
|
|||
if (trailers != NULL) {
|
||||
if (!PySequence_Check(trailers)) {
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"sendfile() trailers must be a sequence or None");
|
||||
"sendfile() trailers must be a sequence");
|
||||
return NULL;
|
||||
} else {
|
||||
Py_ssize_t i = 0; /* Avoid uninitialized warning */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue