From: Michael Droettboom Date: Fri, 3 Nov 2023 15:21:16 +0000 (-0400) Subject: gh-111652: Fix --enable-pystats build (GH-111653) X-Git-Tag: v3.13.0a2~204 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2bc01cc0c72a3d91bdcce09886efa987a90396d9;p=thirdparty%2FPython%2Fcpython.git gh-111652: Fix --enable-pystats build (GH-111653) --- diff --git a/Include/internal/pycore_code.h b/Include/internal/pycore_code.h index 4f126abf4764..eaf84a9c94fc 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)