[Python-3000-checkins] r56046 - python/branches/py3k-struni/Modules/cPickle.c

walter.doerwald python-3000-checkins at python.org
Wed Jun 20 14:37:02 CEST 2007


Author: walter.doerwald
Date: Wed Jun 20 14:37:01 2007
New Revision: 56046

Modified:
   python/branches/py3k-struni/Modules/cPickle.c
Log:
Make pickle errror message unicode objects.


Modified: python/branches/py3k-struni/Modules/cPickle.c
==============================================================================
--- python/branches/py3k-struni/Modules/cPickle.c	(original)
+++ python/branches/py3k-struni/Modules/cPickle.c	Wed Jun 20 14:37:01 2007
@@ -393,13 +393,13 @@
 	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;


More information about the Python-3000-checkins mailing list