summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-12-25 04:35:01 (GMT)
committerBenjamin Peterson <benjamin@python.org>2019-12-25 04:35:01 (GMT)
commite9039f32b3e8b827106cf74db80fbf9477035687 (patch)
tree1b19dd16d037be97be12c037d074f3465b004065 /Doc/c-api
parent4ed79b78002d1c1bca8ea72aaadea07710aca4e9 (diff)
downloadcpython-e9039f32b3e8b827106cf74db80fbf9477035687.zip
cpython-e9039f32b3e8b827106cf74db80fbf9477035687.tar.gz
cpython-e9039f32b3e8b827106cf74db80fbf9477035687.tar.bz2
Minor C API documentation improvements. (GH-17697)
The added parentheses around the PyIter_Next assignment suppress the following warning which gcc throws without: ``` warning: using the result of an assignment as a condition without parentheses [-Wparentheses] ``` The other change is a typo fix (cherry picked from commit 5c7ed7550ec2da16d7679e538fcd7c1a5631811f) Co-authored-by: William Ayd <william.ayd@icloud.com>
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/iter.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/c-api/iter.rst b/Doc/c-api/iter.rst
index 0224d37..a2992b3 100644
--- a/Doc/c-api/iter.rst
+++ b/Doc/c-api/iter.rst
@@ -29,7 +29,7 @@ something like this::
/* propagate error */
}
- while (item = PyIter_Next(iterator)) {
+ while ((item = PyIter_Next(iterator))) {
/* do something with item */
...
/* release reference when done */