File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -2147,7 +2147,7 @@ def print_block(
21472147 write ("\n " )
21482148
21492149 output = ''
2150- if core_includes and clinic :
2150+ if core_includes :
21512151 output += textwrap .dedent ("""
21522152 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
21532153 # include "pycore_gc.h" // PyGC_Head
@@ -2156,11 +2156,12 @@ def print_block(
21562156
21572157 """ )
21582158
2159- # Emit optional includes
2160- for include , reason in sorted (clinic .includes .items ()):
2161- line = f'#include "{ include } "'
2162- line = line .ljust (35 ) + f'// { reason } \n '
2163- output += line
2159+ if clinic :
2160+ # Emit optional includes
2161+ for include , reason in sorted (clinic .includes .items ()):
2162+ line = f'#include "{ include } "'
2163+ line = line .ljust (35 ) + f'// { reason } \n '
2164+ output += line
21642165
21652166 input = '' .join (block .input )
21662167 output += '' .join (block .output )
You can’t perform that action at this time.
0 commit comments