bpo-47169: Add feature macro PY_HAVE_THREAD_NATIVE_ID to the stable ABI definition by encukou · Pull Request #32365 · python/cpython
Expand Up
@@ -49,8 +49,17 @@
'MS_WINDOWS': 'on Windows',
'HAVE_FORK': 'on platforms with fork()',
'USE_STACKCHECK': 'on platforms with USE_STACKCHECK',
'PY_HAVE_THREAD_NATIVE_ID': 'on platforms with native thread IDs',
}
# To generate the DLL definition, we need to know which feature macros are # defined on Windows. On all platforms. # Best way to do that is to hardcode the list (and later test in on Windows). WINDOWS_IFDEFS = frozenset({ 'MS_WINDOWS', 'PY_HAVE_THREAD_NATIVE_ID', })
# The stable ABI manifest (Misc/stable_abi.txt) exists only to fill the # following dataclasses. # Feel free to change its syntax (and the `parse_manifest` function) Expand Down Expand Up @@ -232,15 +241,15 @@ def sort_key(item):
for item in sorted( manifest.select( {'function'}, include_abi_only=True, ifdef={'MS_WINDOWS'}), {'function'}, include_abi_only=True, ifdef=WINDOWS_IFDEFS), key=sort_key): write(f'EXPORT_FUNC({item.name})')
write()
for item in sorted( manifest.select( {'data'}, include_abi_only=True, ifdef={'MS_WINDOWS'}), {'data'}, include_abi_only=True, ifdef=WINDOWS_IFDEFS), key=sort_key): write(f'EXPORT_DATA({item.name})')
Expand Down
# To generate the DLL definition, we need to know which feature macros are # defined on Windows. On all platforms. # Best way to do that is to hardcode the list (and later test in on Windows). WINDOWS_IFDEFS = frozenset({ 'MS_WINDOWS', 'PY_HAVE_THREAD_NATIVE_ID', })
# The stable ABI manifest (Misc/stable_abi.txt) exists only to fill the # following dataclasses. # Feel free to change its syntax (and the `parse_manifest` function) Expand Down Expand Up @@ -232,15 +241,15 @@ def sort_key(item):
for item in sorted( manifest.select( {'function'}, include_abi_only=True, ifdef={'MS_WINDOWS'}), {'function'}, include_abi_only=True, ifdef=WINDOWS_IFDEFS), key=sort_key): write(f'EXPORT_FUNC({item.name})')
write()
for item in sorted( manifest.select( {'data'}, include_abi_only=True, ifdef={'MS_WINDOWS'}), {'data'}, include_abi_only=True, ifdef=WINDOWS_IFDEFS), key=sort_key): write(f'EXPORT_DATA({item.name})')
Expand Down