diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2023-11-06 11:09:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-06 11:09:22 -0700 |
commit | d4426e8d001cfb4590911e2e7de6963e12529faf (patch) | |
tree | e8363d3f93fd0bc6d86996603971081507e97ec4 /Include/internal/pycore_pyerrors.h | |
parent | 836e0a75d565ecb7e2485fee88dbe67e649a1d5f (diff) | |
download | cpython-d4426e8d001cfb4590911e2e7de6963e12529faf.tar.gz cpython-d4426e8d001cfb4590911e2e7de6963e12529faf.zip |
gh-76785: Move _Py_excinfo Functions Out of the Internal C-API (gh-111715)
I added _Py_excinfo to the internal API (and added its functions in Python/errors.c) in gh-111530 (9322ce9). Since then I've had a nagging sense that I should have added the type and functions in its own PR. While I do plan on using _Py_excinfo outside crossinterp.c very soon (see gh-111572/gh-111573), I'd still feel more comfortable if the _Py_excinfo stuff went in as its own PR. Hence, here we are.
(FWIW, I may combine that with gh-111572, which I may, in turn, combine with gh-111573. We'll see.)
Diffstat (limited to 'Include/internal/pycore_pyerrors.h')
-rw-r--r-- | Include/internal/pycore_pyerrors.h | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/Include/internal/pycore_pyerrors.h b/Include/internal/pycore_pyerrors.h index a953d2bb18d..0f16fb894d1 100644 --- a/Include/internal/pycore_pyerrors.h +++ b/Include/internal/pycore_pyerrors.h @@ -68,30 +68,6 @@ extern PyStatus _PyErr_InitTypes(PyInterpreterState *); extern void _PyErr_FiniTypes(PyInterpreterState *); -/* exception snapshots */ - -// Ultimately we'd like to preserve enough information about the -// exception and traceback that we could re-constitute (or at least -// simulate, a la traceback.TracebackException), and even chain, a copy -// of the exception in the calling interpreter. - -typedef struct _excinfo { - const char *type; - const char *msg; -} _Py_excinfo; - -extern void _Py_excinfo_Clear(_Py_excinfo *info); -extern int _Py_excinfo_Copy(_Py_excinfo *dest, _Py_excinfo *src); -extern const char * _Py_excinfo_InitFromException( - _Py_excinfo *info, - PyObject *exc); -extern void _Py_excinfo_Apply(_Py_excinfo *info, PyObject *exctype); -extern const char * _Py_excinfo_AsUTF8( - _Py_excinfo *info, - char *buf, - size_t bufsize); - - /* other API */ static inline PyObject* _PyErr_Occurred(PyThreadState *tstate) |