Add phuang patch from Issue 708374 which adds offset parameter to mmap module.
diff --git a/Doc/library/mmap.rst b/Doc/library/mmap.rst
index abe5b7b..0e982c1 100644
--- a/Doc/library/mmap.rst
+++ b/Doc/library/mmap.rst
@@ -40,7 +40,7 @@
length.
-.. function:: mmap(fileno, length[, tagname[, access]])
+.. function:: mmap(fileno, length[, tagname[, access[, offset]]])
**(Windows version)** Maps *length* bytes from the file specified by the file
handle *fileno*, and returns a mmap object. If *length* is larger than the
@@ -56,8 +56,12 @@
the mapping is created without a name. Avoiding the use of the tag parameter
will assist in keeping your code portable between Unix and Windows.
+ *offset* may be specified as a non-negative integer offset. mmap references will
+ be relative to the offset from the beginning of the file. *offset* defaults to 0.
+ *offset* must be a multiple of the ALLOCATIONGRANULARITY.
-.. function:: mmap(fileno, length[, flags[, prot[, access]]])
+
+.. function:: mmap(fileno, length[, flags[, prot[, access[, offset]]]])
:noindex:
**(Unix version)** Maps *length* bytes from the file specified by the file
@@ -79,6 +83,10 @@
parameter. It is an error to specify both *flags*, *prot* and *access*. See
the description of *access* above for information on how to use this parameter.
+ *offset* may be specified as a non-negative integer offset. mmap references will
+ be relative to the offset from the beginning of the file. *offset* defaults to 0.
+ *offset* must be a multiple of the PAGESIZE or ALLOCATIONGRANULARITY.
+
Memory-mapped file objects support the following methods:
@@ -171,3 +179,4 @@
created with :const:`ACCESS_READ`, then writing to it will throw a
:exc:`TypeError` exception.
+