Skip to content

Commit 22c8590

Browse files
authored
gh-148718: Fix Py_STACKREF_DEBUG build by defining macros (#148719)
1 parent bfe6f9f commit 22c8590

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Include/internal/pycore_stackref.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ static const _PyStackRef PyStackRef_NULL = { .index = 0 };
7171
static const _PyStackRef PyStackRef_ERROR = { .index = (1 << Py_TAGGED_SHIFT) };
7272

7373
#define PyStackRef_None ((_PyStackRef){ .index = (2 << Py_TAGGED_SHIFT) } )
74-
#define PyStackRef_False ((_PyStackRef){ .index = (3 << Py_TAGGED_SHIFT) })
75-
#define PyStackRef_True ((_PyStackRef){ .index = (4 << Py_TAGGED_SHIFT) })
74+
#define _Py_STACKREF_FALSE_INDEX (3 << Py_TAGGED_SHIFT)
75+
#define _Py_STACKREF_TRUE_INDEX (4 << Py_TAGGED_SHIFT)
76+
#define PyStackRef_False ((_PyStackRef){ .index = _Py_STACKREF_FALSE_INDEX })
77+
#define PyStackRef_True ((_PyStackRef){ .index = _Py_STACKREF_TRUE_INDEX })
7678

7779
#define INITIAL_STACKREF_INDEX (5 << Py_TAGGED_SHIFT)
7880

0 commit comments

Comments
 (0)