]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-38631: Avoid Py_FatalError() in init_slotdefs() (GH-18263)
authorVictor Stinner <vstinner@python.org>
Thu, 30 Jan 2020 08:02:14 +0000 (09:02 +0100)
committerGitHub <noreply@github.com>
Thu, 30 Jan 2020 08:02:14 +0000 (09:02 +0100)
commit7a1f6c2da46a04d0ff0acc01542f30bfeaf0e0c7
tree97f3f57ed5557bb6eef9bc0fd3071f0fdaf3acd8
parent5eb8bff7e4aa7e4d8580a30323641388c8ff59a5
bpo-38631: Avoid Py_FatalError() in init_slotdefs() (GH-18263)

Rename init_slotdefs() to _PyTypes_InitSlotDefs() and add a return
value of type PyStatus. The function is now called exactly once from
_PyTypes_Init(). Replace calls to init_slotdefs() with an assertion
checking that slotdefs is initialized.
Include/internal/pycore_pylifecycle.h
Objects/object.c
Objects/typeobject.c