diff options
author | Victor Stinner <vstinner@python.org> | 2020-01-30 08:02:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-30 08:02:14 (GMT) |
commit | 7a1f6c2da46a04d0ff0acc01542f30bfeaf0e0c7 (patch) | |
tree | 97f3f57ed5557bb6eef9bc0fd3071f0fdaf3acd8 /Include | |
parent | 5eb8bff7e4aa7e4d8580a30323641388c8ff59a5 (diff) | |
download | cpython-7a1f6c2da46a04d0ff0acc01542f30bfeaf0e0c7.zip cpython-7a1f6c2da46a04d0ff0acc01542f30bfeaf0e0c7.tar.gz cpython-7a1f6c2da46a04d0ff0acc01542f30bfeaf0e0c7.tar.bz2 |
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.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/internal/pycore_pylifecycle.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/internal/pycore_pylifecycle.h b/Include/internal/pycore_pylifecycle.h index 7292349..2dd6149 100644 --- a/Include/internal/pycore_pylifecycle.h +++ b/Include/internal/pycore_pylifecycle.h @@ -51,6 +51,7 @@ extern int _PyFloat_Init(void); extern PyStatus _Py_HashRandomization_Init(const PyConfig *); extern PyStatus _PyTypes_Init(void); +extern PyStatus _PyTypes_InitSlotDefs(void); extern PyStatus _PyImportZip_Init(PyThreadState *tstate); extern PyStatus _PyGC_Init(PyThreadState *tstate); |