mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-107954, PEP 741: Add PyInitConfig C API (#123502)
Add Doc/c-api/config.rst documentation.
This commit is contained in:
parent
9e079c220b
commit
ef9d54703f
9 changed files with 976 additions and 32 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue