diff options
author | Fred Drake <fdrake@acm.org> | 2001-01-11 22:49:49 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-01-11 22:49:49 (GMT) |
commit | ca7e1ee01ae29a92a64d72017f22bc94599d709d (patch) | |
tree | 209268fb45634b0b294400f232afd4c3e55b1321 /Doc/lib/libmmap.tex | |
parent | d8aaec04bab4814b4492c29af34ebb10d53311b2 (diff) | |
download | cpython-ca7e1ee01ae29a92a64d72017f22bc94599d709d.zip cpython-ca7e1ee01ae29a92a64d72017f22bc94599d709d.tar.gz cpython-ca7e1ee01ae29a92a64d72017f22bc94599d709d.tar.bz2 |
Updated descriptions to incorporate additional information from Tim Peters.
This mostly closes SF bug #128251.
Diffstat (limited to 'Doc/lib/libmmap.tex')
-rw-r--r-- | Doc/lib/libmmap.tex | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/Doc/lib/libmmap.tex b/Doc/lib/libmmap.tex index 41fcc34..8d04ede 100644 --- a/Doc/lib/libmmap.tex +++ b/Doc/lib/libmmap.tex @@ -20,25 +20,27 @@ different on Unix and on Windows. \begin{funcdesc}{mmap}{fileno, length\optional{, tagname}} \strong{(Windows version)} Maps \var{length} bytes from the file specified by the file handle \var{fileno}, and returns a mmap object. +If \var{length} is \code{0}, the maximum length of the map will be the +current size of the file when \function{mmap()} is called. If you wish to map an existing Python file object, use its \method{fileno()} method to obtain the correct value for the -\var{fileno} parameter. - -\var{tagname}, if specified, is a string giving a tag name for the mapping. -Windows allows you to have many different mappings against the same -file. If you specify the name of an existing tag, that tag is opened, -otherwise a new tag of this name is created. If this parameter is -None, 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. +\var{fileno} parameter. The file must be opened for update. + +\var{tagname}, if specified and not \code{None}, is a string giving a +tag name for the mapping. Windows allows you to have many different +mappings against the same file. If you specify the name of an +existing tag, that tag is opened, otherwise a new tag of this name is +created. If this parameter is omitted or \code{None}, 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. \end{funcdesc} \begin{funcdesc}{mmap}{fileno, size\optional{, flags, prot}} -\strong{(Unix version)} Maps \var{length} bytes from the file +\strong{(\UNIX{} version)} Maps \var{length} bytes from the file specified by the file handle \var{fileno}, and returns a mmap object. If you wish to map an existing Python file object, use its \method{fileno()} method to obtain the correct value for the -\var{fileno} parameter. +\var{fileno} parameter. The file must be opened for update. \var{flags} specifies the nature of the mapping. \constant{MAP_PRIVATE} creates a private copy-on-write mapping, so |