diff options
author | Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> | 2024-12-17 16:06:36 (GMT) |
---|---|---|
committer | Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> | 2024-12-17 16:06:36 (GMT) |
commit | be8ae086874cac42eea104c1ff21ef5868d50bdd (patch) | |
tree | 905b6c9326e3ebee2047a18e5eba981c81c35dcc /Include/internal/pycore_pyerrors.h | |
parent | d70e5c1fefb69c541205a7e97795f10fd61c2905 (diff) | |
parent | 7303f06846b69016a075bca7ad7c6055f29ad024 (diff) | |
download | cpython-be8ae086874cac42eea104c1ff21ef5868d50bdd.zip cpython-be8ae086874cac42eea104c1ff21ef5868d50bdd.tar.gz cpython-be8ae086874cac42eea104c1ff21ef5868d50bdd.tar.bz2 |
Merge branch 'main' of https://github.com/python/cpython
Diffstat (limited to 'Include/internal/pycore_pyerrors.h')
-rw-r--r-- | Include/internal/pycore_pyerrors.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Include/internal/pycore_pyerrors.h b/Include/internal/pycore_pyerrors.h index 02945f0..6f2fdda 100644 --- a/Include/internal/pycore_pyerrors.h +++ b/Include/internal/pycore_pyerrors.h @@ -130,6 +130,18 @@ PyAPI_FUNC(void) _PyErr_SetString( PyObject *exception, const char *string); +/* + * Set an exception with the error message decoded from the current locale + * encoding (LC_CTYPE). + * + * Exceptions occurring in decoding take priority over the desired exception. + * + * Exported for '_ctypes' shared extensions. + */ +PyAPI_FUNC(void) _PyErr_SetLocaleString( + PyObject *exception, + const char *string); + PyAPI_FUNC(PyObject*) _PyErr_Format( PyThreadState *tstate, PyObject *exception, |