Skip to content

Commit 58b4564

Browse files
Fix PyStackRef_IsValid accordingly
1 parent 0780c36 commit 58b4564

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
@@ -300,7 +300,7 @@ static inline bool
300300
PyStackRef_IsValid(_PyStackRef ref)
301301
{
302302
/* Invalid values are ERROR and NULL */
303-
return ref.bits >= Py_INT_TAG;
303+
return (ref.bits & Py_TAG_BITS) >= Py_INT_TAG;
304304
}
305305

306306
static inline bool

0 commit comments

Comments
 (0)