[Python-checkins] CVS: python/dist/src/Doc/api api.tex,1.117.2.2,1.117.2.3
Fred L. Drake
fdrake@users.sourceforge.net
Tue, 29 May 2001 11:53:13 -0700
Update of /cvsroot/python/python/dist/src/Doc/api
In directory usw-pr-cvs1:/tmp/cvs-serv28872/api
Modified Files:
Tag: release21-maint
api.tex
Log Message:
Users of PySequence_GET_FAST() should get the length of the sequence using
PySequence_Size(), not PyObject_Size(): the later considers the mapping
methods as well as the sequence methods, which is not needed here. Either
should be equally fast in this case, but PySequence_Size() offers a better
conceptual match.
Index: api.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/api/api.tex,v
retrieving revision 1.117.2.2
retrieving revision 1.117.2.3
diff -C2 -r1.117.2.2 -r1.117.2.3
*** api.tex 2001/05/21 15:58:54 1.117.2.2
--- api.tex 2001/05/29 18:53:11 1.117.2.3
***************
*** 2017,2021 ****
returned by \cfunction{PySequence_Fast()}, and that \var{i} is within
bounds. The caller is expected to get the length of the sequence by
! calling \cfunction{PyObject_Size()} on \var{o}, since lists and tuples
are guaranteed to always return their true length.
\end{cfuncdesc}
--- 2017,2021 ----
returned by \cfunction{PySequence_Fast()}, and that \var{i} is within
bounds. The caller is expected to get the length of the sequence by
! calling \cfunction{PySequence_Size()} on \var{o}, since lists and tuples
are guaranteed to always return their true length.
\end{cfuncdesc}