Skip to content

Commit 9eca136

Browse files
committed
Fix free-threaded macro
1 parent adaaa26 commit 9eca136

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Include/internal/pycore_stackref.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ PyStackRef_IsNullOrInt(_PyStackRef ref);
239239
#else
240240

241241
#define Py_INT_TAG 3
242+
#define Py_TAG_REFCNT 1
242243

243244
static inline bool
244245
PyStackRef_IsTaggedInt(_PyStackRef i)
@@ -264,7 +265,7 @@ PyStackRef_UntagInt(_PyStackRef i)
264265

265266
#ifdef Py_GIL_DISABLED
266267

267-
#define Py_TAG_DEFERRED (1)
268+
#define Py_TAG_DEFERRED Py_TAG_REFCNT
268269

269270
#define Py_TAG_PTR ((uintptr_t)0)
270271
#define Py_TAG_BITS ((uintptr_t)1)
@@ -444,7 +445,6 @@ PyStackRef_AsStrongReference(_PyStackRef stackref)
444445
* as they can (must) have their reclamation deferred */
445446

446447
#define Py_TAG_BITS 3
447-
#define Py_TAG_REFCNT 1
448448
#if _Py_IMMORTAL_FLAGS != Py_TAG_REFCNT
449449
# error "_Py_IMMORTAL_FLAGS != Py_TAG_REFCNT"
450450
#endif

0 commit comments

Comments
 (0)