Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update to use Argument Clinic
  • Loading branch information
aisk committed Oct 11, 2025
commit 7215d14cb5e942fe58352bea72e0877291d6edf9
2 changes: 1 addition & 1 deletion Lib/test/test_mmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,7 @@ def test_flush_parameters(self):
if hasattr(mmap, 'MS_ASYNC'):
m.flush(flags=mmap.MS_ASYNC)
if hasattr(mmap, 'MS_INVALIDATE'):
m.flush(PAGESIZE * 2, flags=mmap.MS_INVALIDATE)
m.flush(PAGESIZE * 2, mmap.MS_INVALIDATE)
if hasattr(mmap, 'MS_ASYNC') and hasattr(mmap, 'MS_INVALIDATE'):
m.flush(0, PAGESIZE, flags=mmap.MS_ASYNC | mmap.MS_INVALIDATE)

Expand Down
67 changes: 57 additions & 10 deletions Modules/clinic/mmapmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Modules/mmapmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1034,12 +1034,14 @@ mmap.mmap.flush
offset: Py_ssize_t = 0
size: Py_ssize_t = -1
/
flags: int = 0

[clinic start generated code]*/

static PyObject *
mmap_mmap_flush_impl(mmap_object *self, Py_ssize_t offset, Py_ssize_t size)
/*[clinic end generated code: output=956ced67466149cf input=c50b893bc69520ec]*/
mmap_mmap_flush_impl(mmap_object *self, Py_ssize_t offset, Py_ssize_t size,
int flags)
/*[clinic end generated code: output=4225f4174dc75a53 input=e79195ecf4f0a271]*/
{
CHECK_VALID(NULL);
if (size == -1) {
Expand Down
Loading