summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2024-09-03 12:33:49 (GMT)
committerGitHub <noreply@github.com>2024-09-03 12:33:49 (GMT)
commitef9d54703f1f21d2fde2fe3ef49d4cf7c8b38f06 (patch)
treef4955ada605c8562ba07183bb47ca88e800a1d29 /Objects
parent9e079c220b7f64d78a1aa36a23b513d7f377a694 (diff)
downloadcpython-ef9d54703f1f21d2fde2fe3ef49d4cf7c8b38f06.zip
cpython-ef9d54703f1f21d2fde2fe3ef49d4cf7c8b38f06.tar.gz
cpython-ef9d54703f1f21d2fde2fe3ef49d4cf7c8b38f06.tar.bz2
gh-107954, PEP 741: Add PyInitConfig C API (#123502)
Add Doc/c-api/config.rst documentation.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index fc1fb78..2494c98 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -5393,7 +5393,7 @@ _Py_DecodeUTF8_surrogateescape(const char *arg, Py_ssize_t arglen,
}
-/* UTF-8 encoder using the surrogateescape error handler .
+/* UTF-8 encoder.
On success, return 0 and write the newly allocated character string (use
PyMem_Free() to free the memory) into *str.
@@ -15906,7 +15906,7 @@ encode_wstr_utf8(wchar_t *wstr, char **str, const char *name)
int res;
res = _Py_EncodeUTF8Ex(wstr, str, NULL, NULL, 1, _Py_ERROR_STRICT);
if (res == -2) {
- PyErr_Format(PyExc_RuntimeWarning, "cannot decode %s", name);
+ PyErr_Format(PyExc_RuntimeWarning, "cannot encode %s", name);
return -1;
}
if (res < 0) {