mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
bpo-37129: Add os.RWF_APPEND flag for os.pwritev() (GH-20336)
This commit is contained in:
parent
e4799b9594
commit
76ef255bde
4 changed files with 27 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue