@@ -521,7 +521,7 @@ def gcc_get_limited_api_macros(headers):
521
521
522
522
api_hexversion = sys .version_info .major << 24 | sys .version_info .minor << 16
523
523
524
- preprocesor_output_with_macros = subprocess .check_output (
524
+ preprocessor_output_with_macros = subprocess .check_output (
525
525
sysconfig .get_config_var ("CC" ).split ()
526
526
+ [
527
527
# Prevent the expansion of the exported macros so we can
@@ -540,7 +540,7 @@ def gcc_get_limited_api_macros(headers):
540
540
return {
541
541
target
542
542
for target in re .findall (
543
- r"#define (\w+)" , preprocesor_output_with_macros
543
+ r"#define (\w+)" , preprocessor_output_with_macros
544
544
)
545
545
}
546
546
@@ -561,7 +561,7 @@ def gcc_get_limited_api_definitions(headers):
561
561
Requires Python built with a GCC-compatible compiler. (clang might work)
562
562
"""
563
563
api_hexversion = sys .version_info .major << 24 | sys .version_info .minor << 16
564
- preprocesor_output = subprocess .check_output (
564
+ preprocessor_output = subprocess .check_output (
565
565
sysconfig .get_config_var ("CC" ).split ()
566
566
+ [
567
567
# Prevent the expansion of the exported macros so we can capture
@@ -581,13 +581,13 @@ def gcc_get_limited_api_definitions(headers):
581
581
stderr = subprocess .DEVNULL ,
582
582
)
583
583
stable_functions = set (
584
- re .findall (r"__PyAPI_FUNC\(.*?\)\s*(.*?)\s*\(" , preprocesor_output )
584
+ re .findall (r"__PyAPI_FUNC\(.*?\)\s*(.*?)\s*\(" , preprocessor_output )
585
585
)
586
586
stable_exported_data = set (
587
- re .findall (r"__EXPORT_DATA\((.*?)\)" , preprocesor_output )
587
+ re .findall (r"__EXPORT_DATA\((.*?)\)" , preprocessor_output )
588
588
)
589
589
stable_data = set (
590
- re .findall (r"__PyAPI_DATA\(.*?\)[\s\*\(]*([^);]*)\)?.*;" , preprocesor_output )
590
+ re .findall (r"__PyAPI_DATA\(.*?\)[\s\*\(]*([^);]*)\)?.*;" , preprocessor_output )
591
591
)
592
592
return stable_data | stable_exported_data | stable_functions
593
593
0 commit comments