[Python-checkins] CVS: python/dist/src/Doc/api api.tex,1.123,1.124

Fred L. Drake fdrake@users.sourceforge.net
Tue, 29 May 2001 08:13:02 -0700


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

Modified Files:
	api.tex 
Log Message:

Do not start API descriptions with "Does the same, but ..." -- actually
state *which* other function the current one is like, even if the
descriptions are adjacent.

Revise the _PyTuple_Resize() description to reflect the removal of the
third parameter.


Index: api.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/api/api.tex,v
retrieving revision 1.123
retrieving revision 1.124
diff -C2 -r1.123 -r1.124
*** api.tex	2001/05/21 15:56:55	1.123
--- api.tex	2001/05/29 15:13:00	1.124
***************
*** 3219,3223 ****
  
  \begin{cfuncdesc}{PyObject*}{PyTuple_GET_ITEM}{PyObject *p, int pos}
! Does the same, but does no checking of its arguments.
  \end{cfuncdesc}
  
--- 3219,3224 ----
  
  \begin{cfuncdesc}{PyObject*}{PyTuple_GET_ITEM}{PyObject *p, int pos}
! Like \cfunction{PyTuple_GetItem()}, but does no checking of its
! arguments.
  \end{cfuncdesc}
  
***************
*** 3237,3257 ****
  \begin{cfuncdesc}{void}{PyTuple_SET_ITEM}{PyObject *p,
                                            int pos, PyObject *o}
! Does the same, but does no error checking, and
  should \emph{only} be used to fill in brand new tuples.
  \strong{Note:}  This function ``steals'' a reference to \var{o}.
  \end{cfuncdesc}
  
! \begin{cfuncdesc}{int}{_PyTuple_Resize}{PyObject **p,
!                                         int newsize, int last_is_sticky}
  Can be used to resize a tuple.  \var{newsize} will be the new length
  of the tuple.  Because tuples are \emph{supposed} to be immutable,
  this should only be used if there is only one reference to the object.
  Do \emph{not} use this if the tuple may already be known to some other
! part of the code.  The tuple will always grow or shrink at the end.  The
! \var{last_is_sticky} flag is not used and should always be false.  Think
! of this as destroying the old tuple and creating a new one, only more
! efficiently.  Returns \code{0} on success and \code{-1} on failure (in
! which case a \exception{MemoryError} or \exception{SystemError} will be
! raised).
  \end{cfuncdesc}
  
--- 3238,3260 ----
  \begin{cfuncdesc}{void}{PyTuple_SET_ITEM}{PyObject *p,
                                            int pos, PyObject *o}
! Like \cfunction{PyTuple_SetItem()}, but does no error checking, and
  should \emph{only} be used to fill in brand new tuples.
  \strong{Note:}  This function ``steals'' a reference to \var{o}.
  \end{cfuncdesc}
  
! \begin{cfuncdesc}{int}{_PyTuple_Resize}{PyObject **p, int newsize}
  Can be used to resize a tuple.  \var{newsize} will be the new length
  of the tuple.  Because tuples are \emph{supposed} to be immutable,
  this should only be used if there is only one reference to the object.
  Do \emph{not} use this if the tuple may already be known to some other
! part of the code.  The tuple will always grow or shrink at the end.
! Think of this as destroying the old tuple and creating a new one, only
! more efficiently.  Returns \code{0} on success.  Client code should
! never assume that the resulting value of \code{*\var{p}} will be the
! same as before calling this function.  If the object referenced by
! \code{*\var{p}} is replaced, the original \code{*\var{p}} is
! destroyed.  On failure, returns \code{-1} and sets \code{*\var{p}} to
! \NULL, and raises \exception{MemoryError} or \exception{SystemError}.
! \versionchanged[Removed unused third parameter, \var{last_is_sticky}]{2.2}
  \end{cfuncdesc}