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

A.M. Kuchling python-dev@python.org
Sat, 17 Jun 2000 21:17:40 -0700


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory slayer.i.sourceforge.net:/tmp/cvs-serv24238

Modified Files:
	libmmap.tex 
Log Message:
Make changes and clarifications suggested by Mark Hammond

Index: libmmap.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmmap.tex,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** libmmap.tex	2000/06/17 22:39:05	1.1
--- libmmap.tex	2000/06/18 04:17:38	1.2
***************
*** 20,34 ****
  \begin{funcdesc}{mmap}{fileno, length \optional{, tagname} }
  (Windows version) Maps \var{length} bytes from the file specified by
! the file handle \var{fileno}, and returns a mmap object.  If you have
! a Python file object, its
! \method{fileno()} method returns the file's handle, which is just an integer.
! \var{tagname}, if specified, is a string giving a tag name for the mapping. XXX what is the purpose of the tag name?
  \end{funcdesc}
  
! \begin{funcdesc}{mmap}{file, size \optional{, flags, prot}}
  (Unix version) Maps \var{length} bytes from the file specified by the
! file handle \var{fileno}, and returns a mmap object.  If you have a
! Python file object, its \method{fileno()} method returns the file's
! handle, which is just an integer.
  
  \var{flags} specifies the nature of the mapping.  
--- 20,41 ----
  \begin{funcdesc}{mmap}{fileno, length \optional{, tagname} }
  (Windows 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{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.
  \end{funcdesc}
  
! \begin{funcdesc}{mmap}{fileno, size \optional{, flags, prot}}
  (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{flags} specifies the nature of the mapping.  
***************
*** 62,67 ****
  Flushes changes made to the in-memory copy of a file back to disk.
  Without use of this call there is no guarantee that changes are
! written back before the object is destroyed.  If \var{offset} 
! and \var{size} are specified, only changes to the given range of bytes will be flushed to disk; otherwise, the whole extent of the mapping is flushed.
  \end{methoddesc}
  
--- 69,76 ----
  Flushes changes made to the in-memory copy of a file back to disk.
  Without use of this call there is no guarantee that changes are
! written back before the object is destroyed.  If \var{offset} and
! \var{size} are specified, only changes to the given range of bytes
! will be flushed to disk; otherwise, the whole extent of the mapping is
! flushed.
  \end{methoddesc}
  
***************
*** 72,76 ****
  
  \begin{methoddesc}{read}{\var{num}}
! Return a string containing up to \var{num} bytes taken from the
  current file position; the file position is updated to point after the
  bytes that were returned. 
--- 81,85 ----
  
  \begin{methoddesc}{read}{\var{num}}
! Return a string containing up to \var{num} bytes starting from the
  current file position; the file position is updated to point after the
  bytes that were returned. 
***************
*** 78,83 ****
  
  \begin{methoddesc}{read_byte}{}
! Returns the character at the current file position, and advancing 
! the file position by 1.
  \end{methoddesc}
  
--- 87,92 ----
  
  \begin{methoddesc}{read_byte}{}
! Returns a string of length 1 containing the character at the current
! file position, and advances the file position by 1.
  \end{methoddesc}
  
***************
*** 114,118 ****
  
  \begin{methoddesc}{write_byte}{\var{byte}}
! Write \var{byte} into memory at the current position of
  the file pointer; the file position is advanced by 1.
  \end{methoddesc}
--- 123,127 ----
  
  \begin{methoddesc}{write_byte}{\var{byte}}
! Write the single-character string \var{byte} into memory at the current position of
  the file pointer; the file position is advanced by 1.
  \end{methoddesc}