mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
[3.13] gh-117482: Simplify the Fix For Builtin Types Slot Wrappers (gh-121932)
In gh-121602, I applied a fix to a builtin types initialization bug. That fix made sense in the context of some broader future changes, but introduced a little bit of extra complexity. For earlier versions those future changes are not relevant; we can avoid the extra complexity. Thus we can revert that earlier change and replace it with this one, which is more focused and conceptually simpler. This is essentially the implementation of an idea that @markshannon pointed out to me. Note that this change would be much smaller if we didn't have to deal with repr compatibility for builtin types that explicitly inherit tp slots (see expect_manually_inherited()). The alternative is to stop *explicitly* inheriting tp slots in static PyTypeObject values, which is churn that we can do separately.
This commit is contained in:
parent
0952ea94d9
commit
716c6771fc
2 changed files with 93 additions and 31 deletions
|
@ -33,7 +33,6 @@ struct _types_runtime_state {
|
|||
struct {
|
||||
struct {
|
||||
PyTypeObject *type;
|
||||
PyTypeObject def;
|
||||
int64_t interp_count;
|
||||
} types[_Py_MAX_MANAGED_STATIC_TYPES];
|
||||
} managed_static;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue