summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-11-08 22:43:46 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-11-08 22:43:46 (GMT)
commit2f02a511353c761bef2ab867ca4295bbb0217b96 (patch)
tree955a54d70d6f09279e7fd593e15f003d139b7b2b /Modules
parent0cfba09b097d2aa4d35c7b1411cb32565f17a891 (diff)
downloadcpython-2f02a511353c761bef2ab867ca4295bbb0217b96.zip
cpython-2f02a511353c761bef2ab867ca4295bbb0217b96.tar.gz
cpython-2f02a511353c761bef2ab867ca4295bbb0217b96.tar.bz2
PyUnicode_EncodeFS() raises an exception if _Py_wchar2char() fails
* Add error_pos optional argument to _Py_wchar2char() * PyUnicode_EncodeFS() raises a UnicodeEncodeError or MemoryError if _Py_wchar2char() fails
Diffstat (limited to 'Modules')
-rw-r--r--Modules/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/main.c b/Modules/main.c
index 008b6a4..590104d 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -646,7 +646,7 @@ Py_Main(int argc, wchar_t **argv)
if (fp == NULL) {
char *cfilename_buffer;
const char *cfilename;
- cfilename_buffer = _Py_wchar2char(filename);
+ cfilename_buffer = _Py_wchar2char(filename, NULL);
if (cfilename_buffer != NULL)
cfilename = cfilename_buffer;
else