Skip to content

New warning: unused variable ‘main_interp’ #104233

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

Closed
sobolevn opened this issue May 6, 2023 · 0 comments
Closed

New warning: unused variable ‘main_interp’ #104233

sobolevn opened this issue May 6, 2023 · 0 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@sobolevn
Copy link
Member

sobolevn commented May 6, 2023

Снимок экрана 2023-05-06 в 15 17 06

Here:

cpython/Python/ceval_gil.c

Lines 550 to 553 in f508800

PyInterpreterState *main_interp = _PyInterpreterState_Main();
assert(interp != main_interp);
assert(interp->ceval.gil == main_interp->ceval.gil);
interp->ceval.gil = NULL;

Cause: f3e7eb4

I think the right thing to do here is to guard these lines with #ifdef Py_DEBUG.

I will send a PR.
CC @ericsnowcurrently

Linked PRs

@sobolevn sobolevn added type-bug An unexpected behavior, bug, or error interpreter-core (Objects, Python, Grammar, and Parser dirs) labels May 6, 2023
@sobolevn sobolevn self-assigned this May 6, 2023
sobolevn added a commit to sobolevn/cpython that referenced this issue May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants