mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
CVS patch #477161: New "access" keyword for mmap, from Jay T Miller.
This gives mmap() on Windows the ability to create read-only, write- through and copy-on-write mmaps. A new keyword argument is introduced because the mmap() signatures diverged between Windows and Unix, so while they (now) both support this functionality, there wasn't a way to spell it in a common way without introducing a new spelling gimmick. The old spellings are still accepted, so there isn't a backward- compatibility issue here.
This commit is contained in:
parent
afeb2a4d89
commit
5ebfd36afa
5 changed files with 411 additions and 144 deletions
|
@ -17,4 +17,17 @@ test_mmap
|
|||
Try to seek beyond end of mmap...
|
||||
Try to seek to negative position...
|
||||
Attempting resize()
|
||||
Creating 10 byte test data file.
|
||||
Opening mmap with access=ACCESS_READ
|
||||
Ensuring that readonly mmap can't be slice assigned.
|
||||
Ensuring that readonly mmap can't be item assigned.
|
||||
Ensuring that readonly mmap can't be write() to.
|
||||
Ensuring that readonly mmap can't be write_byte() to.
|
||||
Ensuring that readonly mmap can't be resized.
|
||||
Opening mmap with access=ACCESS_WRITE
|
||||
Modifying write-through memory map.
|
||||
Opening mmap with access=ACCESS_COPY
|
||||
Modifying copy-on-write memory map.
|
||||
Ensuring copy-on-write maps cannot be resized.
|
||||
Ensuring invalid access parameter raises exception.
|
||||
Test passed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue