[Python-3000-checkins] r58619 - python/branches/py3k/Modules/timemodule.c

guido.van.rossum python-3000-checkins at python.org
Tue Oct 23 21:43:28 CEST 2007


Author: guido.van.rossum
Date: Tue Oct 23 21:43:28 2007
New Revision: 58619

Modified:
   python/branches/py3k/Modules/timemodule.c
Log:
Patch #1314 by Christian Heimes.
Fix failing unittests for time and strptime on German and probably other
localized Windows installations.


Modified: python/branches/py3k/Modules/timemodule.c
==============================================================================
--- python/branches/py3k/Modules/timemodule.c	(original)
+++ python/branches/py3k/Modules/timemodule.c	Tue Oct 23 21:43:28 2007
@@ -528,7 +528,8 @@
 			   e.g. an empty format, or %Z when the timezone
 			   is unknown. */
 			PyObject *ret;
-			ret = PyUnicode_FromStringAndSize(outbuf, buflen);
+			ret = PyUnicode_Decode(outbuf, buflen,
+					       TZNAME_ENCODING, NULL);
 			PyMem_Free(outbuf);
 			return ret;
 		}
@@ -1035,5 +1036,3 @@
 
 	return 0;
 }
-
-


More information about the Python-3000-checkins mailing list