gh-110481: fix 'unused function' warning for is_shared_refcnt_dead
. (gh-111974)
Fix 'unused function' warning for `is_shared_refcnt_dead`. The `is_shared_refcnt_dead` function is only used if `Py_REF_DEBUG` is set.
This commit is contained in:
parent
ae8116cfa9
commit
fa84e5fe0a
@ -297,6 +297,7 @@ _Py_DecRef(PyObject *o)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Py_NOGIL
|
#ifdef Py_NOGIL
|
||||||
|
# ifdef Py_REF_DEBUG
|
||||||
static inline int
|
static inline int
|
||||||
is_shared_refcnt_dead(Py_ssize_t shared)
|
is_shared_refcnt_dead(Py_ssize_t shared)
|
||||||
{
|
{
|
||||||
@ -306,6 +307,7 @@ is_shared_refcnt_dead(Py_ssize_t shared)
|
|||||||
return shared == (Py_ssize_t)0xDDDDDDDD;
|
return shared == (Py_ssize_t)0xDDDDDDDD;
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
# endif
|
||||||
|
|
||||||
void
|
void
|
||||||
_Py_DecRefSharedDebug(PyObject *o, const char *filename, int lineno)
|
_Py_DecRefSharedDebug(PyObject *o, const char *filename, int lineno)
|
||||||
@ -412,7 +414,7 @@ _Py_ExplicitMergeRefcount(PyObject *op, Py_ssize_t extra)
|
|||||||
_Py_atomic_store_uintptr_relaxed(&op->ob_tid, 0);
|
_Py_atomic_store_uintptr_relaxed(&op->ob_tid, 0);
|
||||||
return refcnt;
|
return refcnt;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* Py_NOGIL */
|
||||||
|
|
||||||
|
|
||||||
/**************************************/
|
/**************************************/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user