https://github.com/python/cpython/commit/c824d8e6f96a2c36c9f955f3be6138caaae35bfa
commit: c824d8e6f96a2c36c9f955f3be6138caaae35bfa
branch: main
author: Neil Schemenauer <nas-git...@arctrix.com>
committer: kumaraditya303 <kumaradi...@python.org>
date: 2025-03-27T13:58:59+05:30
summary:

gh-131782: Fix cast to match type of `bits` in `_Py_TryIncrefCompareStackRef` 
(#131783)

files:
M Include/internal/pycore_stackref.h

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)) {

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to