Skip to content

gh-110481: fix 'unused function' warning for is_shared_refcnt_dead. #111974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Objects/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,15 +297,17 @@ _Py_DecRef(PyObject *o)
}

#ifdef Py_NOGIL
# ifdef Py_REF_DEBUG
static inline int
is_shared_refcnt_dead(Py_ssize_t shared)
{
#if SIZEOF_SIZE_T == 8
# if SIZEOF_SIZE_T == 8
return shared == (Py_ssize_t)0xDDDDDDDDDDDDDDDD;
#else
# else
return shared == (Py_ssize_t)0xDDDDDDDD;
#endif
# endif
}
# endif

void
_Py_DecRefSharedDebug(PyObject *o, const char *filename, int lineno)
Expand Down Expand Up @@ -412,7 +414,7 @@ _Py_ExplicitMergeRefcount(PyObject *op, Py_ssize_t extra)
_Py_atomic_store_uintptr_relaxed(&op->ob_tid, 0);
return refcnt;
}
#endif
#endif /* Py_NOGIL */


/**************************************/
Expand Down