[Python-checkins] bpo-44890: Fix AMD build error (GH-27740)

iritkatriel webhook-mailer at python.org
Thu Aug 12 10:20:49 EDT 2021


https://github.com/python/cpython/commit/789a6af29f531f78abd2e2f6af80084ccabf80b1
commit: 789a6af29f531f78abd2e2f6af80084ccabf80b1
branch: main
author: Irit Katriel <1055913+iritkatriel at users.noreply.github.com>
committer: iritkatriel <1055913+iritkatriel at users.noreply.github.com>
date: 2021-08-12T15:20:44+01:00
summary:

bpo-44890: Fix AMD build error (GH-27740)

files:
M Include/internal/pycore_code.h

diff --git a/Include/internal/pycore_code.h b/Include/internal/pycore_code.h
index 85f09544d4a09..282089c08379e 100644
--- a/Include/internal/pycore_code.h
+++ b/Include/internal/pycore_code.h
@@ -305,8 +305,13 @@ int _Py_Specialize_BinarySubscr(PyObject *sub, PyObject *container, _Py_CODEUNIT
 #define PRINT_SPECIALIZATION_STATS_DETAILED 0
 #define PRINT_SPECIALIZATION_STATS_TO_FILE 0
 
-#define COLLECT_SPECIALIZATION_STATS (Py_DEBUG || PRINT_SPECIALIZATION_STATS)
-#define COLLECT_SPECIALIZATION_STATS_DETAILED (Py_DEBUG || PRINT_SPECIALIZATION_STATS_DETAILED)
+#ifdef Py_DEBUG
+#define COLLECT_SPECIALIZATION_STATS 1
+#define COLLECT_SPECIALIZATION_STATS_DETAILED 1
+#else
+#define COLLECT_SPECIALIZATION_STATS PRINT_SPECIALIZATION_STATS
+#define COLLECT_SPECIALIZATION_STATS_DETAILED PRINT_SPECIALIZATION_STATS_DETAILED
+#endif
 
 #define SPECIALIZATION_FAILURE_KINDS 20
 



More information about the Python-checkins mailing list