Skip to content

Commit e0ff9f8

Browse files
Fix PyStackRef_IsError for gil-enabled build
1 parent 48d0d0d commit e0ff9f8

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
@@ -293,7 +293,7 @@ PyStackRef_Unwrap(_PyStackRef ref)
293293
static inline bool
294294
PyStackRef_IsError(_PyStackRef ref)
295295
{
296-
return ref.bits == Py_TAG_INVALID;
296+
return (ref.bits & Py_TAG_BITS) == Py_TAG_INVALID;
297297
}
298298

299299
static inline bool

0 commit comments

Comments
 (0)