Skip to content
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

bpo-46417: Py_Finalize() clears static exceptioins #30805

Merged
merged 2 commits into from Jan 22, 2022

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jan 22, 2022

The Py_Finalize() function now clears exceptions implemented as
static types.

Add _PyExc_FiniTypes() function, called by _PyExc_Fini().

https://bugs.python.org/issue46417

The Py_Finalize() function now clears exceptions implemented as
static types.

Add _PyExc_FiniTypes() function, called by _PyExc_Fini().
return;
}

for (Py_ssize_t i=Py_ARRAY_LENGTH(static_exceptions) - 1; i >= 0; i--) {
Copy link
Contributor

@arhadthedev arhadthedev Jan 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (Py_ssize_t i=Py_ARRAY_LENGTH(static_exceptions) - 1; i >= 0; i--) {
for (Py_ssize_t i = Py_ARRAY_LENGTH(static_exceptions) - 1; i >= 0; i--) {

Copy link
Member Author

@vstinner vstinner Jan 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well well well. I would make the line more consistent, but I decided to merge my PR since I'm working on a looong serie of changes: see https://bugs.python.org/issue46417

The CPython C code base is far from being consistent and the PEP 7 is quite relaxed in terms of coding style.

@vstinner vstinner merged commit 621a45c into python:main Jan 22, 2022
10 of 11 checks passed
@vstinner vstinner deleted the exc_finitypes branch Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants