diff options
Diffstat (limited to 'Include/cpython/weakrefobject.h')
| -rw-r--r-- | Include/cpython/weakrefobject.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/cpython/weakrefobject.h b/Include/cpython/weakrefobject.h index 1078fffc2e..bec69ba90d 100644 --- a/Include/cpython/weakrefobject.h +++ b/Include/cpython/weakrefobject.h @@ -38,7 +38,7 @@ PyAPI_FUNC(void) _PyWeakref_ClearRef(PyWeakReference *self); static inline PyObject* PyWeakref_GET_OBJECT(PyObject *ref_obj) { assert(PyWeakref_Check(ref_obj)); - PyWeakReference *ref = (PyWeakReference *)ref_obj; + PyWeakReference *ref = _Py_CAST(PyWeakReference*, ref_obj); PyObject *obj = ref->wr_object; // Explanation for the Py_REFCNT() check: when a weakref's target is part // of a long chain of deallocations which triggers the trashcan mechanism, |
