summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
authorYoSTEALTH <35307184+YoSTEALTH@users.noreply.github.com>2020-05-27 21:32:22 (GMT)
committerGitHub <noreply@github.com>2020-05-27 21:32:22 (GMT)
commit76ef255bde772005bbd0761399b274c2240e61d3 (patch)
treed292b61c01295213a7baa5c27abf5658caa2df00 /Modules/posixmodule.c
parente4799b95945b44eb0e2eea26473db8e0a49ed0ee (diff)
downloadcpython-76ef255bde772005bbd0761399b274c2240e61d3.zip
cpython-76ef255bde772005bbd0761399b274c2240e61d3.tar.gz
cpython-76ef255bde772005bbd0761399b274c2240e61d3.tar.bz2
bpo-37129: Add os.RWF_APPEND flag for os.pwritev() (GH-20336)
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 59ac47d..47ae7a8 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -9778,6 +9778,7 @@ The flags argument contains a bitwise OR of zero or more of the following flags:
- RWF_DSYNC
- RWF_SYNC
+- RWF_APPEND
Using non-zero flags requires Linux 4.7 or newer.
[clinic start generated code]*/
@@ -9785,7 +9786,7 @@ Using non-zero flags requires Linux 4.7 or newer.
static Py_ssize_t
os_pwritev_impl(PyObject *module, int fd, PyObject *buffers, Py_off_t offset,
int flags)
-/*[clinic end generated code: output=e3dd3e9d11a6a5c7 input=803dc5ddbf0cfd3b]*/
+/*[clinic end generated code: output=e3dd3e9d11a6a5c7 input=35358c327e1a2a8e]*/
{
Py_ssize_t cnt;
Py_ssize_t result;
@@ -14509,6 +14510,9 @@ all_ins(PyObject *m)
#ifdef RWF_NOWAIT
if (PyModule_AddIntConstant(m, "RWF_NOWAIT", RWF_NOWAIT)) return -1;
#endif
+#ifdef RWF_APPEND
+ if (PyModule_AddIntConstant(m, "RWF_APPEND", RWF_APPEND)) return -1;
+#endif
/* constants for posix_spawn */
#ifdef HAVE_POSIX_SPAWN