Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5498/Modules Modified Files: Tag: release24-maint _codecsmodule.c Log Message: Backport checkin: SF bug #1251300: On UCS-4 builds the "unicode-internal" codec will now complain about illegal code points. The codec now supports PEP 293 style error handlers. (This is a variant of the patch by Nik Haldimann that detects truncated data) Index: _codecsmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_codecsmodule.c,v retrieving revision 2.20.2.1 retrieving revision 2.20.2.2 diff -u -d -r2.20.2.1 -r2.20.2.2 --- _codecsmodule.c 8 Mar 2005 15:05:17 -0000 2.20.2.1 +++ _codecsmodule.c 30 Aug 2005 10:46:06 -0000 2.20.2.2 @@ -254,8 +254,8 @@ else { if (PyObject_AsReadBuffer(obj, (const void **)&data, &size)) return NULL; - return codec_tuple(PyUnicode_FromUnicode((Py_UNICODE *)data, - size / sizeof(Py_UNICODE)), + + return codec_tuple(_PyUnicode_DecodeUnicodeInternal(data, size, errors), size); } }