_Py_RefcntAdd
This is used by list and tuple internally:
list
tuple
>>> import sys >>> sys.getrefcount(None) == (1 << 32) - 1 True >>> refs = [None] * 42 >>> sys.getrefcount(None) == (1 << 32) - 1 False >>> del refs >>> sys.getrefcount(None) == (1 << 32) - 1 True
I'll have a PR up in a bit.
CC: @ericsnowcurrently, @eduardo-elizondo
GH-104142: Fix _Py_RefcntAdd to respect immortality (GH-104143)
Merge branch 'main' into inlinecomp2
Activity
GH-104142: Fix _Py_RefcntAdd to respect immortality (GH-104143)
Merge branch 'main' into inlinecomp2