mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
[3.12] gh-117482: Fix Builtin Types Slot Wrappers (gh-121632)
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 5250a03133, AKA gh-121602)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
This commit is contained in:
parent
5492f84c14
commit
0ec761a96a
4 changed files with 74 additions and 9 deletions
|
|
@ -305,6 +305,11 @@ Objects/sliceobject.c - _Py_EllipsisObject -
|
|||
Python/instrumentation.c - _PyInstrumentation_DISABLE -
|
||||
Python/instrumentation.c - _PyInstrumentation_MISSING -
|
||||
|
||||
##-----------------------
|
||||
## other
|
||||
|
||||
Objects/typeobject.c - static_type_defs -
|
||||
|
||||
|
||||
##################################
|
||||
## global non-objects to fix in core code
|
||||
|
|
|
|||
|
Can't render this file because it has a wrong number of fields in line 4.
|
Loading…
Add table
Add a link
Reference in a new issue