Skip to content

Commit 789a6af

Browse files
authored
bpo-44890: Fix AMD build error (GH-27740)
1 parent 8ac0886 commit 789a6af

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Include/internal/pycore_code.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,13 @@ int _Py_Specialize_BinarySubscr(PyObject *sub, PyObject *container, _Py_CODEUNIT
305305
#define PRINT_SPECIALIZATION_STATS_DETAILED 0
306306
#define PRINT_SPECIALIZATION_STATS_TO_FILE 0
307307

308-
#define COLLECT_SPECIALIZATION_STATS (Py_DEBUG || PRINT_SPECIALIZATION_STATS)
309-
#define COLLECT_SPECIALIZATION_STATS_DETAILED (Py_DEBUG || PRINT_SPECIALIZATION_STATS_DETAILED)
308+
#ifdef Py_DEBUG
309+
#define COLLECT_SPECIALIZATION_STATS 1
310+
#define COLLECT_SPECIALIZATION_STATS_DETAILED 1
311+
#else
312+
#define COLLECT_SPECIALIZATION_STATS PRINT_SPECIALIZATION_STATS
313+
#define COLLECT_SPECIALIZATION_STATS_DETAILED PRINT_SPECIALIZATION_STATS_DETAILED
314+
#endif
310315

311316
#define SPECIALIZATION_FAILURE_KINDS 20
312317

0 commit comments

Comments
 (0)