X Tutup
Skip to content

[3.13] gh-117482: Fix Builtin Types Slot Wrappers (gh-121602)#121630

Merged
ericsnowcurrently merged 1 commit intopython:3.13from
miss-islington:backport-5250a03-3.13
Jul 11, 2024
Merged

[3.13] gh-117482: Fix Builtin Types Slot Wrappers (gh-121602)#121630
ericsnowcurrently merged 1 commit intopython:3.13from
miss-islington:backport-5250a03-3.13

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jul 11, 2024

When builtin static types are initialized for a subinterpreter, various "tp" slots have already been inherited (for the main interpreter). This was interfering with the logic in add_operators() (in Objects/typeobject.c), causing a wrapper to get created when it shouldn't. This change fixes that by preserving the original data from the static type struct and checking that.
(cherry picked from commit 5250a03)

Co-authored-by: Eric Snow ericsnowcurrently@gmail.com

When builtin static types are initialized for a subinterpreter, various "tp" slots have already been inherited (for the main interpreter).  This was interfering with the logic in add_operators() (in Objects/typeobject.c), causing a wrapper to get created when it shouldn't.  This change fixes that by preserving the original data from the static type struct and checking that.
(cherry picked from commit 5250a03)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

X Tutup