From 01fb2747389ac17c30041c1a12cb61cb1b59bb0f Mon Sep 17 00:00:00 2001 From: Neil Schemenauer Date: Wed, 26 Mar 2025 16:54:19 -0700 Subject: [PATCH] Fix cast to match type of `bits`. --- Include/internal/pycore_stackref.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Include/internal/pycore_stackref.h b/Include/internal/pycore_stackref.h index 1a68e0e29da8f1..80e8f4f365f1da 100644 --- a/Include/internal/pycore_stackref.h +++ b/Include/internal/pycore_stackref.h @@ -668,7 +668,7 @@ static inline int _Py_TryIncrefCompareStackRef(PyObject **src, PyObject *op, _PyStackRef *out) { if (_PyObject_HasDeferredRefcount(op)) { - *out = (_PyStackRef){ .bits = (intptr_t)op | Py_TAG_DEFERRED }; + *out = (_PyStackRef){ .bits = (uintptr_t)op | Py_TAG_DEFERRED }; return 1; } if (_Py_TryIncrefCompare(src, op)) {