Skip to content
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
Don't use UINT32_MAX in header file
  • Loading branch information
markshannon committed Dec 12, 2024
commit 957cf8a3f4795f1c09dc6db32fd60d078b9c6f91
2 changes: 1 addition & 1 deletion Include/refcount.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ static inline void Py_DECREF(const char *filename, int lineno, PyObject *op)
#if SIZEOF_VOID_P > 4
/* If an object has been freed, it will have a negative full refcnt
* If it has not it been freed, will have a very large refcnt */
if (op->ob_refcnt_full <= 0 || op->ob_refcnt > (UINT32_MAX - (1<<20))) {
if (op->ob_refcnt_full <= 0 || op->ob_refcnt > (((PY_UINT32_T)-1) - (1<<20))) {
#else
if (op->ob_refcnt <= 0) {
#endif
Expand Down