File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -247,7 +247,7 @@ PyStackRef_IsNullOrInt(_PyStackRef ref);
247247static inline bool
248248PyStackRef_IsTaggedInt (_PyStackRef i )
249249{
250- return (i .bits & Py_INT_TAG ) == Py_INT_TAG ;
250+ return (i .bits & Py_TAG_BITS ) == Py_INT_TAG ;
251251}
252252
253253static inline _PyStackRef
@@ -274,6 +274,7 @@ PyStackRef_IncrementTaggedIntNoOverflow(_PyStackRef ref)
274274 return (_PyStackRef ){ .bits = ref .bits + 4 };
275275}
276276
277+ #define PyStackRef_IsDeferredOrTaggedInt (ref ) (((ref).bits & Py_TAG_REFCNT) != 0)
277278
278279#ifdef Py_GIL_DISABLED
279280
@@ -407,7 +408,7 @@ static inline _PyStackRef
407408PyStackRef_DUP (_PyStackRef stackref )
408409{
409410 assert (!PyStackRef_IsNull (stackref ));
410- if (PyStackRef_IsDeferred (stackref )) {
411+ if (PyStackRef_IsDeferredOrTaggedInt (stackref )) {
411412 return stackref ;
412413 }
413414 Py_INCREF (PyStackRef_AsPyObjectBorrow (stackref ));
You can’t perform that action at this time.
0 commit comments