Skip to content

Commit a3e2f05

Browse files
author
Виталий Дмитриев
authored
gh-96947: Fix comment on pyruntimestate->pyinterpreters struct for 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.
1 parent dfc73b5 commit a3e2f05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Include/internal/pycore_runtime.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ typedef struct pyruntimestate {
9393
in the operation of the runtime. It is also often the only
9494
interpreter. */
9595
PyInterpreterState *main;
96-
/* _next_interp_id is an auto-numbered sequence of small
97-
integers. It gets initialized in _PyInterpreterState_Init(),
96+
/* next_id is an auto-numbered sequence of small
97+
integers. It gets initialized in _PyInterpreterState_Enable(),
9898
which is called in Py_Initialize(), and used in
9999
PyInterpreterState_New(). A negative interpreter ID
100100
indicates an error occurred. The main interpreter will

0 commit comments

Comments
 (0)