summaryrefslogtreecommitdiffstats
path: root/Tools/scripts
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2020-12-15 18:16:13 (GMT)
committerGitHub <noreply@github.com>2020-12-15 18:16:13 (GMT)
commit0911411e0cee4f2bd6906aeece83d2e6ba3c38c0 (patch)
tree69daadfe0dcfd37740e1f50ce476c431e5a74866 /Tools/scripts
parent7f14a3756b61272cc15f24302589874b125c2f04 (diff)
downloadcpython-0911411e0cee4f2bd6906aeece83d2e6ba3c38c0.zip
cpython-0911411e0cee4f2bd6906aeece83d2e6ba3c38c0.tar.gz
cpython-0911411e0cee4f2bd6906aeece83d2e6ba3c38c0.tar.bz2
Update stable ABI script for MacOS and update list of exported symbols (GH-23783)
Diffstat (limited to 'Tools/scripts')
-rwxr-xr-xTools/scripts/stable_abi.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Tools/scripts/stable_abi.py b/Tools/scripts/stable_abi.py
index b3a46f9..47547a9 100755
--- a/Tools/scripts/stable_abi.py
+++ b/Tools/scripts/stable_abi.py
@@ -31,6 +31,7 @@ EXCLUDED_HEADERS = {
"ucnhash.h",
}
+MACOS = (sys.platform == "darwin")
def get_exported_symbols(library, dynamic=False):
# Only look at dynamic symbols
@@ -57,7 +58,10 @@ def get_exported_symbols(library, dynamic=False):
continue
symbol = parts[-1]
- yield symbol
+ if MACOS and symbol.startswith("_"):
+ yield symbol[1:]
+ else:
+ yield symbol
def check_library(stable_abi_file, library, abi_funcs, dynamic=False):