Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0911411

Browse files
authored
Update stable ABI script for MacOS and update list of exported symbols (GH-23783)
1 parent 7f14a37 commit 0911411

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Doc/data/stable_abi.dat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,7 @@ Py_FileSystemDefaultEncodeErrors
743743
Py_FileSystemDefaultEncoding
744744
Py_Finalize
745745
Py_FinalizeEx
746+
Py_FrozenMain
746747
Py_GenericAlias
747748
Py_GenericAliasType
748749
Py_GetBuildInfo

Tools/scripts/stable_abi.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"ucnhash.h",
3232
}
3333

34+
MACOS = (sys.platform == "darwin")
3435

3536
def get_exported_symbols(library, dynamic=False):
3637
# Only look at dynamic symbols
@@ -57,7 +58,10 @@ def get_exported_symbols(library, dynamic=False):
5758
continue
5859

5960
symbol = parts[-1]
60-
yield symbol
61+
if MACOS and symbol.startswith("_"):
62+
yield symbol[1:]
63+
else:
64+
yield symbol
6165

6266

6367
def check_library(stable_abi_file, library, abi_funcs, dynamic=False):

0 commit comments

Comments
 (0)