summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
authorMartin Panter <vadmium>2015-09-09 01:56:53 (GMT)
committerMartin Panter <vadmium>2015-09-09 01:56:53 (GMT)
commit0ff89099c7f1c848c0df3f7f2220b26e08b939da (patch)
treee207a8fe6251a50e6f1b3bb8fee21b916a8a49cb /Modules/posixmodule.c
parentdfcfe133001d8d6a8af05f1ce45d7c14ffd1a588 (diff)
parentbf19d169504823c258a9aae4bf61c8df9ff5987f (diff)
downloadcpython-0ff89099c7f1c848c0df3f7f2220b26e08b939da.zip
cpython-0ff89099c7f1c848c0df3f7f2220b26e08b939da.tar.gz
cpython-0ff89099c7f1c848c0df3f7f2220b26e08b939da.tar.bz2
Issue #23738: Merge 3.4 into 3.5
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index d8bb060..5697495 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -4679,7 +4679,7 @@ os.utime
dir_fd: dir_fd(requires='futimensat') = None
follow_symlinks: bool=True
-# "utime(path, times=None, *, ns=None, dir_fd=None, follow_symlinks=True)\n\
+# "utime(path, times=None, *[, ns], dir_fd=None, follow_symlinks=True)\n\
Set the access and modified time of path.
@@ -4689,10 +4689,10 @@ On some platforms, path may also be specified as an open file descriptor.
If times is not None, it must be a tuple (atime, mtime);
atime and mtime should be expressed as float seconds since the epoch.
-If ns is not None, it must be a tuple (atime_ns, mtime_ns);
+If ns is specified, it must be a tuple (atime_ns, mtime_ns);
atime_ns and mtime_ns should be expressed as integer nanoseconds
since the epoch.
-If both times and ns are None, utime uses the current time.
+If times is None and ns is unspecified, utime uses the current time.
Specifying tuples for both times and ns is an error.
If dir_fd is not None, it should be a file descriptor open to a directory,
@@ -4710,7 +4710,7 @@ dir_fd and follow_symlinks may not be available on your platform.
static PyObject *
os_utime_impl(PyModuleDef *module, path_t *path, PyObject *times,
PyObject *ns, int dir_fd, int follow_symlinks)
-/*[clinic end generated code: output=31f3434e560ba2f0 input=1f18c17d5941aa82]*/
+/*[clinic end generated code: output=31f3434e560ba2f0 input=081cdc54ca685385]*/
{
#ifdef MS_WINDOWS
HANDLE hFile;
@@ -8235,10 +8235,10 @@ os_write_impl(PyModuleDef *module, int fd, Py_buffer *data)
#ifdef HAVE_SENDFILE
PyDoc_STRVAR(posix_sendfile__doc__,
-"sendfile(out, in, offset, nbytes) -> byteswritten\n\
-sendfile(out, in, offset, nbytes, headers=None, trailers=None, flags=0)\n\
+"sendfile(out, in, offset, count) -> byteswritten\n\
+sendfile(out, in, offset, count, headers=None, trailers=None, flags=0)\n\
-> byteswritten\n\
-Copy nbytes bytes from file descriptor in to file descriptor out.");
+Copy count bytes from file descriptor in to file descriptor out.");
/* AC 3.5: don't bother converting, has optional group*/
static PyObject *
@@ -8258,6 +8258,7 @@ posix_sendfile(PyObject *self, PyObject *args, PyObject *kwdict)
off_t sbytes;
struct sf_hdtr sf;
int flags = 0;
+ /* Beware that "in" clashes with Python's own "in" operator keyword */
static char *keywords[] = {"out", "in",
"offset", "count",
"headers", "trailers", "flags", NULL};