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

Fred L. Drake fdrake@users.sourceforge.net
Sat, 02 Jun 2001 20:16:06 -0700


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

Modified Files:
      Tag: release21-maint
	api.tex 
Log Message:

Explained more differences between PyList_SetItem() and PyList_SET_ITEM().
In particular, the affect on existing list content was not sufficiently
explained.

This closes SF bug #429554.


Index: api.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/api/api.tex,v
retrieving revision 1.117.2.3
retrieving revision 1.117.2.4
diff -C2 -r1.117.2.3 -r1.117.2.4
*** api.tex	2001/05/29 18:53:11	1.117.2.3
--- api.tex	2001/06/03 03:16:04	1.117.2.4
***************
*** 3246,3250 ****
                                         PyObject *item}
  Sets the item at index \var{index} in list to \var{item}.
! \strong{Note:}  This function ``steals'' a reference to \var{item}.
  \end{cfuncdesc}
  
--- 3246,3252 ----
                                         PyObject *item}
  Sets the item at index \var{index} in list to \var{item}.
! \strong{Note:}  This function ``steals'' a reference to \var{item} and
! discards a reference to an item already in the list at the affected
! position.
  \end{cfuncdesc}
  
***************
*** 3252,3256 ****
                                                PyObject *o}
  Macro form of \cfunction{PyList_SetItem()} without error checking.
! \strong{Note:}  This function ``steals'' a reference to \var{item}.
  \end{cfuncdesc}
  
--- 3254,3261 ----
                                                PyObject *o}
  Macro form of \cfunction{PyList_SetItem()} without error checking.
! \strong{Note:}  This function ``steals'' a reference to \var{item},
! and, unlike \cfunction{PyList_SetItem()}, does \emph{not} discard a
! reference to any item that it being replaced.  This is normally only
! used to fill in new lists where there is no previous content..
  \end{cfuncdesc}