https://github.com/python/cpython/commit/9b4bbf4401291636e5db90511a0548fffb23a505
commit: 9b4bbf4401291636e5db90511a0548fffb23a505
branch: main
author: Mark Shannon <[email protected]>
committer: encukou <[email protected]>
date: 2024-12-13T10:54:59+01:00
summary:
GH-125174: Don't use `UINT32_MAX` in header file (GH-127863)
files:
M Include/refcount.h
diff --git a/Include/refcount.h b/Include/refcount.h
index 6908c426141378..d98b2dfcf37202 100644
--- a/Include/refcount.h
+++ b/Include/refcount.h
@@ -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
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]