Skip to content

bpo-46222: posixmodule sendfile FreeBSD's constants updates. #30327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Doc/library/os.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1429,6 +1429,15 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo

.. versionadded:: 3.3

.. data:: SF_NOCACHE

Parameter to the :func:`sendfile` function, if the implementation supports
it. The data won't be cached in the virtual memory and will be freed afterwards.

.. availability:: Unix.

.. versionadded:: 3.11


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

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Adding ``SF_NOCACHE`` sendfile constant for FreeBSD for the posixmodule.
4 changes: 4 additions & 0 deletions Modules/posixmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -15170,12 +15170,16 @@ all_ins(PyObject *m)
#ifdef SF_NODISKIO
if (PyModule_AddIntMacro(m, SF_NODISKIO)) return -1;
#endif
/* is obsolete since the 11.x release */
#ifdef SF_MNOWAIT
if (PyModule_AddIntMacro(m, SF_MNOWAIT)) return -1;
#endif
#ifdef SF_SYNC
if (PyModule_AddIntMacro(m, SF_SYNC)) return -1;
#endif
#ifdef SF_NOCACHE
if (PyModule_AddIntMacro(m, SF_NOCACHE)) return -1;
#endif

/* constants for posix_fadvise */
#ifdef POSIX_FADV_NORMAL
Expand Down