]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-148718: Fix Py_STACKREF_DEBUG build by defining macros (#148719)
authorDonghee Na <donghee.na@python.org>
Mon, 20 Apr 2026 12:55:03 +0000 (21:55 +0900)
committerGitHub <noreply@github.com>
Mon, 20 Apr 2026 12:55:03 +0000 (21:55 +0900)
Include/internal/pycore_stackref.h

index 329045b5faaa220a0a93883ab24b43eb61453772..ca4a7c216eda532ac6da8667a011acca8d569de3 100644 (file)
@@ -71,8 +71,10 @@ static const _PyStackRef PyStackRef_NULL = { .index = 0 };
 static const _PyStackRef PyStackRef_ERROR = { .index = (1 << Py_TAGGED_SHIFT) };
 
 #define PyStackRef_None ((_PyStackRef){ .index = (2 << Py_TAGGED_SHIFT) } )
-#define PyStackRef_False ((_PyStackRef){ .index = (3 << Py_TAGGED_SHIFT) })
-#define PyStackRef_True ((_PyStackRef){ .index = (4 << Py_TAGGED_SHIFT) })
+#define _Py_STACKREF_FALSE_INDEX (3 << Py_TAGGED_SHIFT)
+#define _Py_STACKREF_TRUE_INDEX (4 << Py_TAGGED_SHIFT)
+#define PyStackRef_False ((_PyStackRef){ .index = _Py_STACKREF_FALSE_INDEX })
+#define PyStackRef_True ((_PyStackRef){ .index = _Py_STACKREF_TRUE_INDEX })
 
 #define INITIAL_STACKREF_INDEX (5 << Py_TAGGED_SHIFT)