Skip to content

gh-113868: Add a number of MAP_* flags from macOS to module mmap#113869

Merged
ronaldoussoren merged 4 commits into
python:mainfrom
ronaldoussoren:gh-113868
Jan 12, 2024
Merged

gh-113868: Add a number of MAP_* flags from macOS to module mmap#113869
ronaldoussoren merged 4 commits into
python:mainfrom
ronaldoussoren:gh-113868

Conversation

@ronaldoussoren

@ronaldoussoren ronaldoussoren commented Jan 9, 2024

Copy link
Copy Markdown
Contributor

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

But I would sort all names after MAP_SHARED and MAP_PRIVATE (which are special) alphabetically. It helps to search if the name is supported in Python.

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yet few suggestions.

Comment thread Doc/library/mmap.rst Outdated
Comment thread Doc/library/mmap.rst Outdated
ronaldoussoren and others added 2 commits January 9, 2024 21:50
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Comment on lines +1 to +6
Added :data:`mmap.MAP_NORESERVE`, :data:`mmap.MAP_NOEXTEND`,
:data:`mmap.MAP_HASSEMAPHORE`, :data:`mmap.MAP_NOCACHE`,
:data:`mmap.MAP_JIT`, :data:`mmap.MAP_RESILIENT_CODESIGN`,
:data:`mmap.MAP_RESILIENT_MEDIA`, :data:`mmap.MAP_32BIT`,
:data:`mmap.MAP_TRANSLATED_ALLOW_EXECUTE`, :data:`mmap.MAP_UNIX03` and
:data:`mmap.MAP_TPRO`. All of them are ``mmap(2)`` flags on macOS.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Added :data:`mmap.MAP_NORESERVE`, :data:`mmap.MAP_NOEXTEND`,
:data:`mmap.MAP_HASSEMAPHORE`, :data:`mmap.MAP_NOCACHE`,
:data:`mmap.MAP_JIT`, :data:`mmap.MAP_RESILIENT_CODESIGN`,
:data:`mmap.MAP_RESILIENT_MEDIA`, :data:`mmap.MAP_32BIT`,
:data:`mmap.MAP_TRANSLATED_ALLOW_EXECUTE`, :data:`mmap.MAP_UNIX03` and
:data:`mmap.MAP_TPRO`. All of them are ``mmap(2)`` flags on macOS.
Added :data:`~mmap.MAP_32BIT`, :data:`~mmap.MAP_HASSEMAPHORE`,
:data:`~mmap.MAP_JIT`, :data:`~mmap.MAP_NOCACHE`, :data:`~mmap.MAP_NOEXTEND`,
:data:`~mmap.MAP_NORESERVE`, :data:`~mmap.MAP_RESILIENT_CODESIGN`,
:data:`~mmap.MAP_RESILIENT_MEDIA`, :data:`~mmap.MAP_TPRO`,
:data:`~mmap.MAP_TRANSLATED_ALLOW_EXECUTE`, and :data:`~mmap.MAP_UNIX03`
constants in the :mod:`mmap` module.
All of them are ``mmap(2)`` flags on macOS.

@ronaldoussoren
ronaldoussoren merged commit 7997079 into python:main Jan 12, 2024
@ronaldoussoren
ronaldoussoren deleted the gh-113868 branch January 12, 2024 15:56
kulikjak pushed a commit to kulikjak/cpython that referenced this pull request Jan 22, 2024
python#113869)

The new flags were extracted from the macOS 14.2 SDK.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
python#113869)

The new flags were extracted from the macOS 14.2 SDK.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
python#113869)

The new flags were extracted from the macOS 14.2 SDK.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants