gh-146636: Py_mod_abi mandatory for modules created from slots array (GH-146855)

This commit is contained in:
Petr Viktorin 2026-04-02 13:54:21 +02:00 committed by GitHub
parent 97babb8ef7
commit a86963b3e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 153 additions and 19 deletions

View file

@ -735,15 +735,15 @@ int PyABIInfo_Check(PyABIInfo *info, const char *module_name)
return _abiinfo_raise(
module_name,
"incompatible future stable ABI version (%d.%d)",
((info->abi_version) >> 24) % 0xff,
((info->abi_version) >> 16) % 0xff);
((info->abi_version) >> 24) & 0xff,
((info->abi_version) >> 16) & 0xff);
}
if (info->abi_version < Py_PACK_VERSION(3, 2)) {
return _abiinfo_raise(
module_name,
"invalid stable ABI version (%d.%d)",
((info->abi_version) >> 24) % 0xff,
((info->abi_version) >> 16) % 0xff);
((info->abi_version) >> 24) & 0xff,
((info->abi_version) >> 16) & 0xff);
}
}
if (info->flags & PyABIInfo_INTERNAL) {
@ -758,8 +758,8 @@ int PyABIInfo_Check(PyABIInfo *info, const char *module_name)
return _abiinfo_raise(
module_name,
"incompatible ABI version (%d.%d)",
((info->abi_version) >> 24) % 0xff,
((info->abi_version) >> 16) % 0xff);
((info->abi_version) >> 24) & 0xff,
((info->abi_version) >> 16) & 0xff);
}
}
}