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

Fix comment on pyruntimestate->pyinterpreters struct for next_id #96947

Open
vitaldmit opened this issue Sep 20, 2022 · 0 comments
Open

Fix comment on pyruntimestate->pyinterpreters struct for next_id #96947

vitaldmit opened this issue Sep 20, 2022 · 0 comments
Labels
interpreter-core Interpreter core (Objects, Python, Grammar, and Parser dirs)

Comments

@vitaldmit
Copy link
Contributor

vitaldmit commented Sep 20, 2022

_next_interp_id appeared on this commit renamed to next_id (by this commit).

Also, now, next_id gets initialized in _PyInterpreterState_Enable()

cpython/Python/pystate.c

Lines 241 to 244 in 12c5f32

_PyInterpreterState_Enable(_PyRuntimeState *runtime)
{
struct pyinterpreters *interpreters = &runtime->interpreters;
interpreters->next_id = 0;
because _PyInterpreterState_Init() function doesn't exist at all.

@vitaldmit vitaldmit added the docs Documentation in the Doc dir label Sep 20, 2022
@vitaldmit vitaldmit changed the title Fix comment on pyruntimestate->pyinterpreters struct Fix comment on pyruntimestate->pyinterpreters struct for next_id Sep 20, 2022
@vitaldmit vitaldmit changed the title Fix comment on pyruntimestate->pyinterpreters struct for next_id Fix comment on pyruntimestate->pyinterpreters struct for next_id Sep 20, 2022
@ericsnowcurrently ericsnowcurrently added interpreter-core Interpreter core (Objects, Python, Grammar, and Parser dirs) and removed docs Documentation in the Doc dir labels Sep 20, 2022
miss-islington pushed a commit that referenced this issue Sep 20, 2022
…`next_id` (GH-96949)

`_next_interp_id` appeared on [this commit](e377416#diff-7ac11e526f79b42d6ea9d3592cb99da46775640c69fa5510f4a6de87cced7141R68) renamed to `next_id` ([by this commit](2ebc5ce#diff-bccfc01bd96b58c022dde77486b8a896cbb31d7581bd4a4156b32c3654afe468R59)). 

Also, now, `next_id` gets initialized in` _PyInterpreterState_Enable()` https://github.com/python/cpython/blob/12c5f328d2479ac3432df5e266adc4e59adeabfe/Python/pystate.c#L241-L244 because `_PyInterpreterState_Init()` function doesn't exist at all.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core Interpreter core (Objects, Python, Grammar, and Parser dirs)
Projects
None yet
Development

No branches or pull requests

2 participants