]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-125174: Don't use `UINT32_MAX` in header file (GH-127863)
authorMark Shannon <mark@hotpy.org>
Fri, 13 Dec 2024 09:54:59 +0000 (09:54 +0000)
committerGitHub <noreply@github.com>
Fri, 13 Dec 2024 09:54:59 +0000 (10:54 +0100)
Include/refcount.h

index 6908c426141378c03eccb67001358be62dd27edc..d98b2dfcf37202b7bf6503668d2101b8ce8a5f0f 100644 (file)
@@ -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