Skip to content

Commit c824d8e

Browse files
authored
pythongh-131782: Fix cast to match type of bits in _Py_TryIncrefCompareStackRef (python#131783)
1 parent 151d1bf commit c824d8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Include/internal/pycore_stackref.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ static inline int
668668
_Py_TryIncrefCompareStackRef(PyObject **src, PyObject *op, _PyStackRef *out)
669669
{
670670
if (_PyObject_HasDeferredRefcount(op)) {
671-
*out = (_PyStackRef){ .bits = (intptr_t)op | Py_TAG_DEFERRED };
671+
*out = (_PyStackRef){ .bits = (uintptr_t)op | Py_TAG_DEFERRED };
672672
return 1;
673673
}
674674
if (_Py_TryIncrefCompare(src, op)) {

0 commit comments

Comments
 (0)