gh-95795: Move types.next_version_tag to PyInterpreterState (gh-102343)

Core static types will continue to use the global value.  All other types
will use the per-interpreter value.  They all share the same range, where
the global types use values < 2^16 and each interpreter uses values
higher than that.
This commit is contained in:
Eric Snow 2023-04-24 16:30:13 -06:00 committed by GitHub
parent 0dc8b50d33
commit 209a0a7655
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 94 additions and 43 deletions

View file

@ -112,6 +112,9 @@ extern PyTypeObject _PyExc_MemoryError;
.func_state = { \
.next_version = 1, \
}, \
.types = { \
.next_version_tag = _Py_TYPE_BASE_VERSION_TAG, \
}, \
.static_objects = { \
.singletons = { \
._not_used = 1, \