From 2f02a511353c761bef2ab867ca4295bbb0217b96 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 8 Nov 2010 22:43:46 +0000 Subject: 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 --- Include/fileutils.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Include/fileutils.h') diff --git a/Include/fileutils.h b/Include/fileutils.h index 11ebebfba9..2fade9b95c 100644 --- a/Include/fileutils.h +++ b/Include/fileutils.h @@ -10,7 +10,8 @@ PyAPI_FUNC(wchar_t *) _Py_char2wchar( size_t *size); PyAPI_FUNC(char*) _Py_wchar2char( - const wchar_t *text); + const wchar_t *text, + size_t *error_pos); #if defined(HAVE_STAT) && !defined(MS_WINDOWS) PyAPI_FUNC(int) _Py_wstat( -- cgit v1.2.1