mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Issue #18395: Rename `_Py_char2wchar() to :c:func:Py_DecodeLocale`, rename
``_Py_wchar2char()`` to :c:func:`Py_EncodeLocale`, and document these functions.
This commit is contained in:
parent
c6f8c0a1de
commit
f6a271ae98
13 changed files with 138 additions and 68 deletions
|
|
@ -647,7 +647,7 @@ Py_Main(int argc, wchar_t **argv)
|
|||
/* Used by Mac/Tools/pythonw.c to forward
|
||||
* the argv0 of the stub executable
|
||||
*/
|
||||
wchar_t* wbuf = _Py_char2wchar(pyvenv_launcher, NULL);
|
||||
wchar_t* wbuf = Py_DecodeLocale(pyvenv_launcher, NULL);
|
||||
|
||||
if (wbuf == NULL) {
|
||||
Py_FatalError("Cannot decode __PYVENV_LAUNCHER__");
|
||||
|
|
@ -730,7 +730,7 @@ Py_Main(int argc, wchar_t **argv)
|
|||
char *cfilename_buffer;
|
||||
const char *cfilename;
|
||||
int err = errno;
|
||||
cfilename_buffer = _Py_wchar2char(filename, NULL);
|
||||
cfilename_buffer = Py_EncodeLocale(filename, NULL);
|
||||
if (cfilename_buffer != NULL)
|
||||
cfilename = cfilename_buffer;
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue