mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Implement PEP 393.
This commit is contained in:
parent
48d49497c5
commit
d63a3b8beb
102 changed files with 8153 additions and 5431 deletions
|
@ -395,7 +395,7 @@ PyErr_SetFromErrnoWithFilenameObject(PyObject *exc, PyObject *filenameObject)
|
|||
/* remove trailing cr/lf and dots */
|
||||
while (len > 0 && (s_buf[len-1] <= L' ' || s_buf[len-1] == L'.'))
|
||||
s_buf[--len] = L'\0';
|
||||
message = PyUnicode_FromUnicode(s_buf, len);
|
||||
message = PyUnicode_FromWideChar(s_buf, len);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -487,7 +487,7 @@ PyObject *PyErr_SetExcFromWindowsErrWithFilenameObject(
|
|||
/* remove trailing cr/lf and dots */
|
||||
while (len > 0 && (s_buf[len-1] <= L' ' || s_buf[len-1] == L'.'))
|
||||
s_buf[--len] = L'\0';
|
||||
message = PyUnicode_FromUnicode(s_buf, len);
|
||||
message = PyUnicode_FromWideChar(s_buf, len);
|
||||
}
|
||||
|
||||
if (message == NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue