summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid CARLIER <devnexen@gmail.com>2022-05-03 14:53:51 (GMT)
committerGitHub <noreply@github.com>2022-05-03 14:53:51 (GMT)
commit04dc4b06a3afc79a658cacca87ee1d93a34653bd (patch)
tree1a1cf30827f86d70c28e49458e4a7238b20a8b20
parent1699128c4891da3bbe23553d709261d88855b93f (diff)
downloadcpython-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.rst1
-rw-r--r--Modules/posixmodule.c3
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