[Python-checkins] CVS: python/dist/src/Doc/lib libmmap.tex,1.4,1.5

Fred L. Drake fdrake@users.sourceforge.net
Tue, 25 Sep 2001 12:00:10 -0700


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv18307/lib

Modified Files:
	libmmap.tex 
Log Message:
Clarified some points about the interface to the mmap() function.
This closes SF bug #448918.


Index: libmmap.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmmap.tex,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** libmmap.tex	2001/01/11 22:49:49	1.4
--- libmmap.tex	2001/09/25 19:00:08	1.5
***************
*** 15,20 ****
  through the file to different positions.
  
! A memory-mapped file is created by the following function, which is
! different on Unix and on Windows.
  
  \begin{funcdesc}{mmap}{fileno, length\optional{, tagname}}
--- 15,26 ----
  through the file to different positions.
  
! A memory-mapped file is created by the \function{mmap()} function,
! which is different on \UNIX{} and on Windows.  In either case you must
! provide a file descriptor for a file opened for update.
! 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.  Otherwise, you can open the file using the
! \function{os.open()} function, which returns a file descriptor
! directly (the file still needs to be closed when done).
  
  \begin{funcdesc}{mmap}{fileno, length\optional{, tagname}}
***************
*** 23,29 ****
  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.  The file must be opened for update.
  
  \var{tagname}, if specified and not \code{None}, is a string giving a
--- 29,32 ----
***************
*** 36,45 ****
  \end{funcdesc}
  
! \begin{funcdesc}{mmap}{fileno, size\optional{, flags, prot}}
  \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.  The file must be opened for update.
  
  \var{flags} specifies the nature of the mapping.  
--- 39,45 ----
  \end{funcdesc}
  
! \begin{funcdesc}{mmap}{fileno, length\optional{, flags\optional{, prot}}}
  \strong{(\UNIX{} version)}  Maps \var{length} bytes from the file
! specified by the file descriptor \var{fileno}, and returns a mmap object.
  
  \var{flags} specifies the nature of the mapping.  
***************
*** 55,58 ****
--- 55,59 ----
  \var{prot} defaults to \constant{PROT_READ | PROT_WRITE}.
  \end{funcdesc}
+ 
  
  Memory-mapped file objects support the following methods: