diff options
author | David CARLIER <devnexen@gmail.com> | 2022-05-03 14:53:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-03 14:53:51 (GMT) |
commit | 04dc4b06a3afc79a658cacca87ee1d93a34653bd (patch) | |
tree | 1a1cf30827f86d70c28e49458e4a7238b20a8b20 | |
parent | 1699128c4891da3bbe23553d709261d88855b93f (diff) | |
download | cpython-04dc4b06a3afc79a658cacca87ee1d93a34653bd.zip cpython-04dc4b06a3afc79a658cacca87ee1d93a34653bd.tar.gz cpython-04dc4b06a3afc79a658cacca87ee1d93a34653bd.tar.bz2 |
gh-90887: posix module: Add more flags for fcopy_file (#31300)
Closes #90887
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
-rw-r--r-- | Misc/NEWS.d/next/Library/2022-05-02-18-19-46.gh-issue-90887.zQsmfp.rst | 1 | ||||
-rw-r--r-- | Modules/posixmodule.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2022-05-02-18-19-46.gh-issue-90887.zQsmfp.rst b/Misc/NEWS.d/next/Library/2022-05-02-18-19-46.gh-issue-90887.zQsmfp.rst new file mode 100644 index 0000000..089f395 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2022-05-02-18-19-46.gh-issue-90887.zQsmfp.rst @@ -0,0 +1 @@ +Adding ``COPYFILE_STAT``, ``COPYFILE_ACL`` and ``COPYFILE_XATTR`` constants for :func:`os.fcopyfile` available in macOs. diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index a7f5780..c55275c 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -15458,6 +15458,9 @@ all_ins(PyObject *m) #if defined(__APPLE__) if (PyModule_AddIntConstant(m, "_COPYFILE_DATA", COPYFILE_DATA)) return -1; + if (PyModule_AddIntConstant(m, "_COPYFILE_STAT", COPYFILE_STAT)) return -1; + if (PyModule_AddIntConstant(m, "_COPYFILE_ACL", COPYFILE_ACL)) return -1; + if (PyModule_AddIntConstant(m, "_COPYFILE_XATTR", COPYFILE_XATTR)) return -1; #endif #ifdef MS_WINDOWS |