mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
gh-100227: Move func_state.next_version to PyInterpreterState (gh-102334)
https://github.com/python/cpython/issues/100227
This commit is contained in:
parent
cbb0aa71d0
commit
66ff374d4f
5 changed files with 8 additions and 8 deletions
|
|
@ -227,10 +227,11 @@ uint32_t _PyFunction_GetVersionForCurrentState(PyFunctionObject *func)
|
|||
if (func->vectorcall != _PyFunction_Vectorcall) {
|
||||
return 0;
|
||||
}
|
||||
if (_PyRuntime.func_state.next_version == 0) {
|
||||
PyInterpreterState *interp = _PyInterpreterState_GET();
|
||||
if (interp->func_state.next_version == 0) {
|
||||
return 0;
|
||||
}
|
||||
uint32_t v = _PyRuntime.func_state.next_version++;
|
||||
uint32_t v = interp->func_state.next_version++;
|
||||
func->func_version = v;
|
||||
return v;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue