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

Fred L. Drake fdrake@users.sourceforge.net
Fri, 16 Mar 2001 07:41:32 -0800


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

Modified Files:
	api.tex 
Log Message:

Finally fill in the documentation for the PyDict_Next() function.  It is
different enough to actually require an explanation.  ;-)

Fix a couple of PyDictObject* types that should be PyObject* types.


Index: api.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/api/api.tex,v
retrieving revision 1.108
retrieving revision 1.109
diff -C2 -r1.108 -r1.109
*** api.tex	2001/02/28 23:46:44	1.108
--- api.tex	2001/03/16 15:41:29	1.109
***************
*** 3294,3298 ****
  \end{cfuncdesc}
  
! \begin{cfuncdesc}{int}{PyDict_SetItemString}{PyDictObject *p,
              char *key,
              PyObject *val}
--- 3294,3298 ----
  \end{cfuncdesc}
  
! \begin{cfuncdesc}{int}{PyDict_SetItemString}{PyObject *p,
              char *key,
              PyObject *val}
***************
*** 3349,3355 ****
  \end{cfuncdesc}
  
! \begin{cfuncdesc}{int}{PyDict_Next}{PyDictObject *p, int *ppos,
                                      PyObject **pkey, PyObject **pvalue}
! 
  \end{cfuncdesc}
  
--- 3349,3373 ----
  \end{cfuncdesc}
  
! \begin{cfuncdesc}{int}{PyDict_Next}{PyObject *p, int *ppos,
                                      PyObject **pkey, PyObject **pvalue}
! Iterate over all key-value pairs in the dictionary \var{p}.  The
! \ctype{int} referred to by \var{ppos} must be initialized to \code{0}
! prior to the first call to this function to start the iteration; the
! function returns true for each pair in the dictionary, and false once
! all pairs have been reported.  The parameters \var{pkey} and
! \var{pvalue} should either point to \ctype{PyObject*} variables that
! will be filled in with each key and value, respectively, or may be
! \NULL.  The dictionary \var{p} must not be mutated during iteration.
! For example:
! 
! \begin{verbatim}
! PyObject *key, *value;
! int pos = 0;
! 
! while (PyDict_Next(self->dict, &pos, &key, &value)) {
!     /* do something interesting with the values... */
!     ...
! }
! \end{verbatim}
  \end{cfuncdesc}