10000 GH-125174: Don't use `UINT32_MAX` in header file (GH-127863) · python/cpython@9b4bbf4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9b4bbf4

Browse files
authored
GH-125174: Don't use UINT32_MAX in header file (GH-127863)
1 parent 11ff328 commit 9b4bbf4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Include/refcount.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ static inline void Py_DECREF(const char *filename, int lineno, PyObject *op)
377377
#if SIZEOF_VOID_P > 4
378378
/* If an object has been freed, it will have a negative full refcnt
379379
* If it has not it been freed, will have a very large refcnt */
380-
if (op->ob_refcnt_full <= 0 || op->ob_refcnt > (UINT32_MAX - (1<<20))) {
380+
if (op->ob_refcnt_full <= 0 || op->ob_refcnt > (((PY_UINT32_T)-1) - (1<<20))) {
381381
#else
382382
if (op->ob_refcnt <= 0) {
383383
#endif

0 commit comments

Comments
 (0)
0