]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40137: _PyType_GetModuleByDef() doesn't check tp_flags (GH-25504)
authorVictor Stinner <vstinner@python.org>
Wed, 21 Apr 2021 21:36:26 +0000 (23:36 +0200)
committerGitHub <noreply@github.com>
Wed, 21 Apr 2021 21:36:26 +0000 (23:36 +0200)
commitd4aaa34798f0dd8402f412e2aa9d6fa2d6cff5fa
tree1d6376f3e6153091cfc9b6c8aae272168674441e
parent81fe01492c3b0892316719a07fe8b53f85f86a0a
bpo-40137: _PyType_GetModuleByDef() doesn't check tp_flags (GH-25504)

_PyType_GetModuleByDef() no longer checks if types are heap types.

_PyType_GetModuleByDef() must only be called on a heap type created
by PyType_FromModuleAndSpec() or on its subclasses.
type_ready_mro() ensures that a static type cannot inherit from a
heap type.
Objects/typeobject.c