diff options
author | William Ayd <william.ayd@icloud.com> | 2019-12-25 04:25:56 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2019-12-25 04:25:56 (GMT) |
commit | 5c7ed7550ec2da16d7679e538fcd7c1a5631811f (patch) | |
tree | f92abd9e10bef96c8daa2f08c1e9030882cde1ee /Doc/c-api | |
parent | 025eeaa19607b2a80c979668dad405f567444573 (diff) | |
download | cpython-5c7ed7550ec2da16d7679e538fcd7c1a5631811f.zip cpython-5c7ed7550ec2da16d7679e538fcd7c1a5631811f.tar.gz cpython-5c7ed7550ec2da16d7679e538fcd7c1a5631811f.tar.bz2 |
Minor C API documentation improvements. (GH-17696)
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
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/iter.rst | 2 |
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 */ |