File tree Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -2131,9 +2131,8 @@ def print_block(
21312131 self ,
21322132 block : Block ,
21332133 * ,
2134+ clinic : Clinic ,
21342135 core_includes : bool = False ,
2135- # needed if core_includes is true
2136- clinic : Clinic | None = None ,
21372136 ) -> None :
21382137 input = block .input
21392138 output = block .output
@@ -2162,18 +2161,15 @@ def print_block(
21622161 write ("\n " )
21632162
21642163 output = ''
2165- if clinic :
2166- limited_capi = clinic .limited_capi
2167- else :
2168- limited_capi = DEFAULT_LIMITED_CAPI
2169- if core_includes and not limited_capi :
2170- output += textwrap .dedent ("""
2171- #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
2172- # include "pycore_gc.h" // PyGC_Head
2173- # include "pycore_runtime.h" // _Py_ID()
2174- #endif
2175-
2176- """ )
2164+ if core_includes :
2165+ if not clinic .limited_capi :
2166+ output += textwrap .dedent ("""
2167+ #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
2168+ # include "pycore_gc.h" // PyGC_Head
2169+ # include "pycore_runtime.h" // _Py_ID()
2170+ #endif
2171+
2172+ """ )
21772173
21782174 if clinic is not None :
21792175 # Emit optional includes
You can’t perform that action at this time.
0 commit comments