Skip to content

Commit c960b19

Browse files
bpo-46222: posixmodule sendfile FreeBSD's constants updates. (GH-30327)
* posixodule sendfile FreeBSD's constants updates. * πŸ“œπŸ€– Added by blurb_it. Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
1 parent 549e628 commit c960b19

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

β€ŽDoc/library/os.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,6 +1429,15 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo
14291429

14301430
.. versionadded:: 3.3
14311431

1432+
.. data:: SF_NOCACHE
1433+
1434+
Parameter to the :func:`sendfile` function, if the implementation supports
1435+
it. The data won't be cached in the virtual memory and will be freed afterwards.
1436+
1437+
.. availability:: Unix.
1438+
1439+
.. versionadded:: 3.11
1440+
14321441

14331442
.. function:: splice(src, dst, count, offset_src=None, offset_dst=None)
14341443

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Adding ``SF_NOCACHE`` sendfile constant for FreeBSD for the posixmodule.

β€ŽModules/posixmodule.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15170,12 +15170,16 @@ all_ins(PyObject *m)
1517015170
#ifdef SF_NODISKIO
1517115171
if (PyModule_AddIntMacro(m, SF_NODISKIO)) return -1;
1517215172
#endif
15173+
/* is obsolete since the 11.x release */
1517315174
#ifdef SF_MNOWAIT
1517415175
if (PyModule_AddIntMacro(m, SF_MNOWAIT)) return -1;
1517515176
#endif
1517615177
#ifdef SF_SYNC
1517715178
if (PyModule_AddIntMacro(m, SF_SYNC)) return -1;
1517815179
#endif
15180+
#ifdef SF_NOCACHE
15181+
if (PyModule_AddIntMacro(m, SF_NOCACHE)) return -1;
15182+
#endif
1517915183

1518015184
/* constants for posix_fadvise */
1518115185
#ifdef POSIX_FADV_NORMAL

0 commit comments

Comments
Β (0)