gh-105927: _abc and _thread use PyWeakref_GetRef() (#105961)
Hold a strong reference on the object, rather than using a borrowed reference: replace PyWeakref_GET_OBJECT() with PyWeakref_GetRef() and _PyWeakref_GET_REF(). Remove assert(PyWeakref_CheckRef(localweakref)) since it's already tested by _PyWeakref_GET_REF().
V
Victor Stinner committed
fb1e691e4bc7757c11bf9e51dda675f15537db8c
Parent: eaa6702
Committed by GitHub <noreply@github.com>
on 6/21/2023, 1:44:25 PM