From 12d868a43ca75d879b44cd890d3e85373ae58f51 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Thu, 2 Nov 2023 12:52:48 -0400 Subject: [PATCH] gh-111652: Fix --enable-pystats build 7e135a moved code around such that _Py_bit_length was no longer visible to OPT_HIST. This includes "pycore_bitutils.h" to address that. --- Include/internal/pycore_code.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Include/internal/pycore_code.h b/Include/internal/pycore_code.h index 4f126abf47644af..eaf84a9c94fc9be 100644 --- a/Include/internal/pycore_code.h +++ b/Include/internal/pycore_code.h @@ -271,6 +271,8 @@ extern int _PyStaticCode_Init(PyCodeObject *co); #ifdef Py_STATS +#include "pycore_bitutils.h" // _Py_bit_length + #define STAT_INC(opname, name) do { if (_Py_stats) _Py_stats->opcode_stats[opname].specialization.name++; } while (0) #define STAT_DEC(opname, name) do { if (_Py_stats) _Py_stats->opcode_stats[opname].specialization.name--; } while (0) #define OPCODE_EXE_INC(opname) do { if (_Py_stats) _Py_stats->opcode_stats[opname].execution_count++; } while (0)