summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
Diffstat (limited to 'Tools')
-rw-r--r--Tools/c-analyzer/c_parser/preprocessor/gcc.py9
-rwxr-xr-xTools/clinic/clinic.py8
2 files changed, 17 insertions, 0 deletions
diff --git a/Tools/c-analyzer/c_parser/preprocessor/gcc.py b/Tools/c-analyzer/c_parser/preprocessor/gcc.py
index 415a2ba..62538f5 100644
--- a/Tools/c-analyzer/c_parser/preprocessor/gcc.py
+++ b/Tools/c-analyzer/c_parser/preprocessor/gcc.py
@@ -7,9 +7,18 @@ from . import common as _common
# macro. Usually it's defined by the C file which includes it.
# Other header files have a similar issue.
NEED_BUILD_CORE = {
+ # Header ".h" files
'cjkcodecs.h',
'multibytecodec.h',
'socketmodule.h',
+
+ # Argument Clinic ".c.h" files
+ '_testclinic.c.h',
+ '_testclinic_depr.c.h',
+ 'overlapped.c.h',
+ 'posixmodule.c.h',
+ 'selectmodule.c.h',
+ 'sha3module.c.h',
}
TOOL = 'gcc'
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py
index a6974bd..c4304bb 100755
--- a/Tools/clinic/clinic.py
+++ b/Tools/clinic/clinic.py
@@ -3629,6 +3629,8 @@ class unsigned_short_converter(CConverter):
self.format_unit = 'H'
else:
self.converter = '_PyLong_UnsignedShort_Converter'
+ self.add_include('pycore_long.h',
+ '_PyLong_UnsignedShort_Converter()')
def parse_arg(self, argname: str, displayname: str) -> str | None:
if self.format_unit == 'H':
@@ -3690,6 +3692,8 @@ class unsigned_int_converter(CConverter):
self.format_unit = 'I'
else:
self.converter = '_PyLong_UnsignedInt_Converter'
+ self.add_include('pycore_long.h',
+ '_PyLong_UnsignedInt_Converter()')
def parse_arg(self, argname: str, displayname: str) -> str | None:
if self.format_unit == 'I':
@@ -3727,6 +3731,8 @@ class unsigned_long_converter(CConverter):
self.format_unit = 'k'
else:
self.converter = '_PyLong_UnsignedLong_Converter'
+ self.add_include('pycore_long.h',
+ '_PyLong_UnsignedLong_Converter()')
def parse_arg(self, argname: str, displayname: str) -> str | None:
if self.format_unit == 'k':
@@ -3766,6 +3772,8 @@ class unsigned_long_long_converter(CConverter):
self.format_unit = 'K'
else:
self.converter = '_PyLong_UnsignedLongLong_Converter'
+ self.add_include('pycore_long.h',
+ '_PyLong_UnsignedLongLong_Converter()')
def parse_arg(self, argname: str, displayname: str) -> str | None:
if self.format_unit == 'K':