Skip to content

Commit 04dc4b0

Browse files
gh-90887: posix module: Add more flags for fcopy_file (#31300)
Closes #90887 Co-authored-by: Jelle Zijlstra <[email protected]>
1 parent 1699128 commit 04dc4b0

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Adding ``COPYFILE_STAT``, ``COPYFILE_ACL`` and ``COPYFILE_XATTR`` constants for :func:`os.fcopyfile` available in macOs.

Modules/posixmodule.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15458,6 +15458,9 @@ all_ins(PyObject *m)
1545815458

1545915459
#if defined(__APPLE__)
1546015460
if (PyModule_AddIntConstant(m, "_COPYFILE_DATA", COPYFILE_DATA)) return -1;
15461+
if (PyModule_AddIntConstant(m, "_COPYFILE_STAT", COPYFILE_STAT)) return -1;
15462+
if (PyModule_AddIntConstant(m, "_COPYFILE_ACL", COPYFILE_ACL)) return -1;
15463+
if (PyModule_AddIntConstant(m, "_COPYFILE_XATTR", COPYFILE_XATTR)) return -1;
1546115464
#endif
1546215465

1546315466
#ifdef MS_WINDOWS

0 commit comments

Comments
 (0)