summaryrefslogtreecommitdiffstats
path: root/Include/internal/pycore_object.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-09-01 10:43:30 (GMT)
committerGitHub <noreply@github.com>2023-09-01 10:43:30 (GMT)
commitb936cf4fe084474970ea43dba24386f1b08e75ce (patch)
tree1e6d94b328a13412f523d6a05c065e4526b57512 /Include/internal/pycore_object.h
parent844f4c2e12a7c637d1de93dbbb0718be06553510 (diff)
downloadcpython-b936cf4fe084474970ea43dba24386f1b08e75ce.zip
cpython-b936cf4fe084474970ea43dba24386f1b08e75ce.tar.gz
cpython-b936cf4fe084474970ea43dba24386f1b08e75ce.tar.bz2
gh-108634: PyInterpreterState_New() no longer calls Py_FatalError() (#108748)
pycore_create_interpreter() now returns a status, rather than calling Py_FatalError(). * PyInterpreterState_New() now calls Py_ExitStatusException() instead of calling Py_FatalError() directly. * Replace Py_FatalError() with PyStatus in init_interpreter() and _PyObject_InitState(). * _PyErr_SetFromPyStatus() now raises RuntimeError, instead of ValueError. It can now call PyErr_NoMemory(), raise MemoryError, if it detects _PyStatus_NO_MEMORY() error message.
Diffstat (limited to 'Include/internal/pycore_object.h')
-rw-r--r--Include/internal/pycore_object.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/internal/pycore_object.h b/Include/internal/pycore_object.h
index d842816..daa06eb 100644
--- a/Include/internal/pycore_object.h
+++ b/Include/internal/pycore_object.h
@@ -182,7 +182,7 @@ _PyType_HasFeature(PyTypeObject *type, unsigned long feature) {
extern void _PyType_InitCache(PyInterpreterState *interp);
-extern void _PyObject_InitState(PyInterpreterState *interp);
+extern PyStatus _PyObject_InitState(PyInterpreterState *interp);
extern void _PyObject_FiniState(PyInterpreterState *interp);
extern bool _PyRefchain_IsTraced(PyInterpreterState *interp, PyObject *obj);