Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 090bc14

Browse filesBrowse files
miss-islingtonWillAyd
authored andcommitted
Minor C API documentation improvements. (GH-17698)
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 5c7ed75) Co-authored-by: William Ayd <william.ayd@icloud.com>
1 parent 59d06b9 commit 090bc14
Copy full SHA for 090bc14

2 files changed

+2-2Lines changed: 2 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Doc/c-api/iter.rst‎

Copy file name to clipboardExpand all lines: Doc/c-api/iter.rst
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ something like this::
2929
/* propagate error */
3030
}
3131
32-
while (item = PyIter_Next(iterator)) {
32+
while ((item = PyIter_Next(iterator))) {
3333
/* do something with item */
3434
...
3535
/* release reference when done */
Collapse file

‎Doc/includes/custom.c‎

Copy file name to clipboardExpand all lines: Doc/includes/custom.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ PyInit_custom(void)
3737
Py_INCREF(&CustomType);
3838
if (PyModule_AddObject(m, "Custom", (PyObject *) &CustomType) < 0) {
3939
Py_DECREF(&CustomType);
40-
PY_DECREF(m);
40+
Py_DECREF(m);
4141
return NULL;
4242
}
4343

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.