]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Update stable ABI script for MacOS and update list of exported symbols (GH-23783)
authorPablo Galindo <Pablogsal@gmail.com>
Tue, 15 Dec 2020 18:16:13 +0000 (18:16 +0000)
committerGitHub <noreply@github.com>
Tue, 15 Dec 2020 18:16:13 +0000 (18:16 +0000)
Doc/data/stable_abi.dat
Tools/scripts/stable_abi.py

index 28cb50b12301ba9540372e336c44f6373dd0dcd0..c2c9c6e11e4ce1ec508363b433da02f99dcf34e7 100644 (file)
@@ -743,6 +743,7 @@ Py_FileSystemDefaultEncodeErrors
 Py_FileSystemDefaultEncoding
 Py_Finalize
 Py_FinalizeEx
+Py_FrozenMain
 Py_GenericAlias
 Py_GenericAliasType
 Py_GetBuildInfo
index b3a46f985e0a2da75b6bf32c49d4815cd3c1afd1..47547a97bfd318209ae59fb4c75c507013ebce31 100755 (executable)
@@ -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):