From: Walter Dörwald Date: Wed, 20 Jun 2007 12:37:01 +0000 (+0000) Subject: Make pickle errror message unicode objects. X-Git-Tag: v3.0a1~748 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=38e6a69a20b975b9a079170e7875fac130a05659;p=thirdparty%2FPython%2Fcpython.git Make pickle errror message unicode objects. --- diff --git a/Modules/cPickle.c b/Modules/cPickle.c index 00855604066d..8aa6eaa7f850 100644 --- a/Modules/cPickle.c +++ b/Modules/cPickle.c @@ -393,13 +393,13 @@ cPickle_ErrFormat(PyObject *ErrType, char *stringformat, char *format, ...) if (format) args = Py_VaBuildValue(format, va); va_end(va); if (format && ! args) return NULL; - if (stringformat && !(retval=PyString_FromString(stringformat))) + if (stringformat && !(retval=PyUnicode_FromString(stringformat))) return NULL; if (retval) { if (args) { PyObject *v; - v=PyString_Format(retval, args); + v=PyUnicode_Format(retval, args); Py_DECREF(retval); Py_DECREF(args); if (! v) return NULL;