mirror of https://github.com/python/cpython
Bug #1629125: fix wrong data type (int -> Py_ssize_t) in PyDict_Next docs.
(backport from rev. 53477)
This commit is contained in:
parent
c3df1b1392
commit
eb68188a0d
|
@ -2082,7 +2082,7 @@ format.
|
|||
|
||||
\begin{verbatim}
|
||||
PyObject *key, *value;
|
||||
int pos = 0;
|
||||
Py_ssize_t pos = 0;
|
||||
|
||||
while (PyDict_Next(self->dict, &pos, &key, &value)) {
|
||||
/* do something interesting with the values... */
|
||||
|
@ -2097,7 +2097,7 @@ while (PyDict_Next(self->dict, &pos, &key, &value)) {
|
|||
|
||||
\begin{verbatim}
|
||||
PyObject *key, *value;
|
||||
int pos = 0;
|
||||
Py_ssize_t pos = 0;
|
||||
|
||||
while (PyDict_Next(self->dict, &pos, &key, &value)) {
|
||||
int i = PyInt_AS_LONG(value) + 1;
|
||||
|
|
Loading…
Reference in New Issue