gh-107954, PEP 741: Add PyInitConfig C API (#123502)

Add Doc/c-api/config.rst documentation.
This commit is contained in:
Victor Stinner 2024-09-03 14:33:49 +02:00 committed by GitHub
parent 9e079c220b
commit ef9d54703f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 976 additions and 32 deletions

View file

@ -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) {