10000 gh-90763: Modernise xx template module initialisation by erlend-aasland · Pull Request #93078 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-90763: Modernise xx template module initialisation #93078

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 10, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address review: remove unneeded rc variables
  • Loading branch information
erlend-aasland committed May 23, 2022
commit f0fb621dc139c142a1b1eb47606b737a85888486
6 changes: 2 additions & 4 deletions Modules/xxlimited_35.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,7 @@ create_and_add_type(PyObject *module, const char *name, PyType_Spec *spec)
if (type == NULL) {
return NULL;
}
int rc = PyModule_AddObject(module, name, type);
if (rc < 0) {
if (PyModule_AddObject(module, name, type) < 0) {
Py_DECREF(type);
return NULL;
}
Expand All @@ -269,8 +268,7 @@ xx_modexec(PyObject *m)
}
}
Py_INCREF(ErrorObject);
int rc = PyModule_AddObject(m, "error", ErrorObject);
if (rc < 0) {
if (PyModule_AddObject(m, "error", ErrorObject) < 0) {
Py_DECREF(ErrorObject);
return -1;
}
Expand Down
0