]> granicus.if.org Git - python/commitdiff
Bug #1629125: fix wrong data type (int -> Py_ssize_t) in PyDict_Next docs.
authorGeorg Brandl <georg@python.org>
Wed, 17 Jan 2007 21:20:01 +0000 (21:20 +0000)
committerGeorg Brandl <georg@python.org>
Wed, 17 Jan 2007 21:20:01 +0000 (21:20 +0000)
 (backport from rev. 53477)

Doc/api/concrete.tex
Misc/NEWS

index 97ef1341ec42c3f11848c051b36ac65ab91bebaf..e1f3e9a1f910448b8aebebacaffc5683e6321125 100644 (file)
@@ -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;
index cdee2af1a246a55efc1648aefec98141f1c4194e..f2774501cd45dd1adbdca435b674cbf52915a11b 100644 (file)
--- 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