]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-126742: Add _PyErr_SetLocaleString, use it for gdbm & dlerror messages...
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>
Tue, 17 Dec 2024 12:53:16 +0000 (13:53 +0100)
committerGitHub <noreply@github.com>
Tue, 17 Dec 2024 12:53:16 +0000 (14:53 +0200)
commite0b61ffa3806cea2739172adf6e2bcbba3d5fba4
tree9ca0dc2475a275fb2b7904333106fd6d45f33abf
parent6ac578cf535666283c95dff17d70e4d7de0150e7
[3.12] gh-126742: Add _PyErr_SetLocaleString, use it for gdbm & dlerror messages (GH-126746) (GH-128027)

- Add a helper to set an error from locale-encoded `char*`
- Use the helper for gdbm & dlerror messages

Co-authored-by: Victor Stinner <vstinner@python.org>
12 files changed:
Include/internal/pycore_pyerrors.h
Lib/test/test_ctypes/test_dlerror.py
Lib/test/test_dbm_gnu.py
Modules/_ctypes/_ctypes.c
Modules/_ctypes/callproc.c
Modules/_gdbmmodule.c
Modules/_hashopenssl.c
Modules/_sqlite/util.c
Modules/_testcapi/exceptions.c
Modules/main.c
Modules/pyexpat.c
Python/errors.c