mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
Fix typos in variable names, function names, and comments (GH-101868)
This commit is contained in:
parent
467e3f9417
commit
707c37e373
7 changed files with 13 additions and 13 deletions
|
|
@ -521,7 +521,7 @@ def gcc_get_limited_api_macros(headers):
|
|||
|
||||
api_hexversion = sys.version_info.major << 24 | sys.version_info.minor << 16
|
||||
|
||||
preprocesor_output_with_macros = subprocess.check_output(
|
||||
preprocessor_output_with_macros = subprocess.check_output(
|
||||
sysconfig.get_config_var("CC").split()
|
||||
+ [
|
||||
# Prevent the expansion of the exported macros so we can
|
||||
|
|
@ -540,7 +540,7 @@ def gcc_get_limited_api_macros(headers):
|
|||
return {
|
||||
target
|
||||
for target in re.findall(
|
||||
r"#define (\w+)", preprocesor_output_with_macros
|
||||
r"#define (\w+)", preprocessor_output_with_macros
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -561,7 +561,7 @@ def gcc_get_limited_api_definitions(headers):
|
|||
Requires Python built with a GCC-compatible compiler. (clang might work)
|
||||
"""
|
||||
api_hexversion = sys.version_info.major << 24 | sys.version_info.minor << 16
|
||||
preprocesor_output = subprocess.check_output(
|
||||
preprocessor_output = subprocess.check_output(
|
||||
sysconfig.get_config_var("CC").split()
|
||||
+ [
|
||||
# Prevent the expansion of the exported macros so we can capture
|
||||
|
|
@ -581,13 +581,13 @@ def gcc_get_limited_api_definitions(headers):
|
|||
stderr=subprocess.DEVNULL,
|
||||
)
|
||||
stable_functions = set(
|
||||
re.findall(r"__PyAPI_FUNC\(.*?\)\s*(.*?)\s*\(", preprocesor_output)
|
||||
re.findall(r"__PyAPI_FUNC\(.*?\)\s*(.*?)\s*\(", preprocessor_output)
|
||||
)
|
||||
stable_exported_data = set(
|
||||
re.findall(r"__EXPORT_DATA\((.*?)\)", preprocesor_output)
|
||||
re.findall(r"__EXPORT_DATA\((.*?)\)", preprocessor_output)
|
||||
)
|
||||
stable_data = set(
|
||||
re.findall(r"__PyAPI_DATA\(.*?\)[\s\*\(]*([^);]*)\)?.*;", preprocesor_output)
|
||||
re.findall(r"__PyAPI_DATA\(.*?\)[\s\*\(]*([^);]*)\)?.*;", preprocessor_output)
|
||||
)
|
||||
return stable_data | stable_exported_data | stable_functions
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ from .info import Analysis
|
|||
|
||||
|
||||
def analyze(filenmes, **kwargs):
|
||||
results = iter_analyis_results(filenames, **kwargs)
|
||||
results = iter_analysis_results(filenames, **kwargs)
|
||||
return Analysis.from_results(results)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -406,7 +406,7 @@ def version_splitter(s: str) -> tuple[int, ...]:
|
|||
flush()
|
||||
return tuple(version)
|
||||
|
||||
def version_comparitor(version1: str, version2: str) -> Literal[-1, 0, 1]:
|
||||
def version_comparator(version1: str, version2: str) -> Literal[-1, 0, 1]:
|
||||
iterator = itertools.zip_longest(
|
||||
version_splitter(version1), version_splitter(version2), fillvalue=0
|
||||
)
|
||||
|
|
@ -5203,7 +5203,7 @@ class DSLParser:
|
|||
|
||||
def directive_version(self, required: str) -> None:
|
||||
global version
|
||||
if version_comparitor(version, required) < 0:
|
||||
if version_comparator(version, required) < 0:
|
||||
fail("Insufficient Clinic version!\n"
|
||||
f" Version: {version}\n"
|
||||
f" Required: {required}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue