[Python-checkins] cpython (3.2): Issue #16416: Fix compilation error
victor.stinner
python-checkins at python.org
Mon Dec 3 14:13:14 CET 2012
http://hg.python.org/cpython/rev/af6fd3ca6de9
changeset: 80704:af6fd3ca6de9
branch: 3.2
parent: 80702:c838c9b117f1
user: Victor Stinner <victor.stinner at gmail.com>
date: Mon Dec 03 14:11:57 2012 +0100
summary:
Issue #16416: Fix compilation error
files:
Python/fileutils.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Python/fileutils.c b/Python/fileutils.c
--- a/Python/fileutils.c
+++ b/Python/fileutils.c
@@ -169,7 +169,9 @@
if (unicode == NULL)
return NULL;
- bytes = _PyUnicode_AsUTF8String(unicode, "surrogateescape");
+ bytes = PyUnicode_EncodeUTF8(PyUnicode_AS_UNICODE(unicode),
+ PyUnicode_GET_SIZE(unicode),
+ "surrogateescape");
Py_DECREF(unicode);
if (bytes == NULL) {
PyErr_Clear();
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list