summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-01-17 21:20:01 (GMT)
committerGeorg Brandl <georg@python.org>2007-01-17 21:20:01 (GMT)
commiteb68188a0d79979d2b41ffaac25b5059a85fa1d1 (patch)
tree3fe2ea3e7add3d22f34cdf71d1039f5bd0a6910e
parentc3df1b1392e54e74bfc4c12d04e5b5d12558e9be (diff)
downloadcpython-eb68188a0d79979d2b41ffaac25b5059a85fa1d1.zip
cpython-eb68188a0d79979d2b41ffaac25b5059a85fa1d1.tar.gz
cpython-eb68188a0d79979d2b41ffaac25b5059a85fa1d1.tar.bz2
Bug #1629125: fix wrong data type (int -> Py_ssize_t) in PyDict_Next docs.
(backport from rev. 53477)
-rw-r--r--Doc/api/concrete.tex4
-rw-r--r--Misc/NEWS3
2 files changed, 5 insertions, 2 deletions
diff --git a/Doc/api/concrete.tex b/Doc/api/concrete.tex
index 97ef134..e1f3e9a 100644
--- a/Doc/api/concrete.tex
+++ b/Doc/api/concrete.tex
@@ -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;
diff --git a/Misc/NEWS b/Misc/NEWS
index cdee2af..f277450 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -383,6 +383,9 @@ Tests
Documentation
-------------
+- Bug #1629125: fix wrong data type (int -> Py_ssize_t) in PyDict_Next
+ docs.
+
- Bug #1565919: document set types in the Language Reference.
- Bug #1546052: clarify that PyString_FromString(AndSize) copies the