diff options
author | Éric Araujo <merwok@netwok.org> | 2011-10-08 02:57:45 +0200 |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-10-08 02:57:45 +0200 |
commit | 9698ac919dd7f127190feb473267b3798ae78db6 (patch) | |
tree | 0f11a1d01db37892d3447a53c594680a06f9e7fb /Python/errors.c | |
parent | 0f220ff2bf0af4409460add5ae1f0b30ab6dc63f (diff) | |
parent | 5c151e145a5590aa5ac31c5d0202f8a4c20fd52a (diff) | |
download | cpython-9698ac919dd7f127190feb473267b3798ae78db6.tar.gz |
Merge fixes for #10526, #10359, #11254, #9100 and the bug without number
Diffstat (limited to 'Python/errors.c')
-rw-r--r-- | Python/errors.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/errors.c b/Python/errors.c index 5a9a624279..149151ebfa 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -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) |