]> granicus.if.org Git - python/commitdiff
Make it compile with GCC 2.96.
authorGuido van Rossum <guido@python.org>
Wed, 13 Jun 2007 01:04:27 +0000 (01:04 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 13 Jun 2007 01:04:27 +0000 (01:04 +0000)
Objects/unicodeobject.c

index bb4036aa7acd1ee6fbd5f6e6bc0c493b8479c559..18843c060bed60cbb94fe56ea8a11f184524f258 100644 (file)
@@ -803,11 +803,13 @@ PyUnicode_FromFormatV(const char *format, va_list vargs)
                        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 */