gh-137210: Add a struct, slot & function for checking an extension's ABI (GH-137212)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
This commit is contained in:
Petr Viktorin 2025-09-05 16:23:18 +02:00 committed by GitHub
parent c1a9c23195
commit 0c74fc8af0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 654 additions and 8 deletions

View file

@ -81,10 +81,13 @@ struct PyModuleDef_Slot {
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030d0000
# define Py_mod_gil 4
#endif
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 15)
# define Py_mod_abi 5
#endif
#ifndef Py_LIMITED_API
#define _Py_mod_LAST_SLOT 4
#define _Py_mod_LAST_SLOT 5
#endif
#endif /* New in 3.5 */