[Python-3000-checkins] r55945 - python/branches/py3k-struni/Objects/unicodeobject.c

guido.van.rossum python-3000-checkins at python.org
Wed Jun 13 03:04:35 CEST 2007


Author: guido.van.rossum
Date: Wed Jun 13 03:04:27 2007
New Revision: 55945

Modified:
   python/branches/py3k-struni/Objects/unicodeobject.c
Log:
Make it compile with GCC 2.96.


Modified: python/branches/py3k-struni/Objects/unicodeobject.c
==============================================================================
--- python/branches/py3k-struni/Objects/unicodeobject.c	(original)
+++ python/branches/py3k-struni/Objects/unicodeobject.c	Wed Jun 13 03:04:27 2007
@@ -803,11 +803,13 @@
 			case 'S':
 			case 'R':
 			{
+				Py_UNICODE *ucopy;
+				Py_ssize_t usize;
+				Py_ssize_t upos;
 				/* unused, since we already have the result */
 				(void) va_arg(vargs, PyObject *);
-				Py_UNICODE *ucopy = PyUnicode_AS_UNICODE(*callresult);
-				Py_ssize_t usize = PyUnicode_GET_SIZE(*callresult);
-				Py_ssize_t upos;
+				ucopy = PyUnicode_AS_UNICODE(*callresult);
+				usize = PyUnicode_GET_SIZE(*callresult);
 				for (upos = 0; upos<usize;)
 					*s++ = ucopy[upos++];
 				/* We're done with the unicode()/repr() => forget it */


More information about the Python-3000-checkins mailing list