]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-111652: Fix --enable-pystats build (GH-111653)
authorMichael Droettboom <mdboom@gmail.com>
Fri, 3 Nov 2023 15:21:16 +0000 (11:21 -0400)
committerGitHub <noreply@github.com>
Fri, 3 Nov 2023 15:21:16 +0000 (15:21 +0000)
Include/internal/pycore_code.h

index 4f126abf47644af4c223710fdaf000e7a154d3c9..eaf84a9c94fc9becd693a0dbbc1598bbd73a8281 100644 (file)
@@ -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)