summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-08-17 15:41:00 (GMT)
committerGuido van Rossum <guido@python.org>2007-08-17 15:41:00 (GMT)
commit8d991ed2e1bbb2b4f25d01eae82c5123c168aa6d (patch)
tree36bb5eb5fc9ddec7e9ea09780657fd4969a44586 /Objects
parent76f2b2416a81380f247637f59a699d42628945e4 (diff)
downloadcpython-8d991ed2e1bbb2b4f25d01eae82c5123c168aa6d.zip
cpython-8d991ed2e1bbb2b4f25d01eae82c5123c168aa6d.tar.gz
cpython-8d991ed2e1bbb2b4f25d01eae82c5123c168aa6d.tar.bz2
Move some declarations before code, to compile with GCC 2.95.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 54fe16c..5ee3347 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -2024,13 +2024,6 @@ PyUnicode_DecodeUTF32Stateful(const char *s,
const unsigned char *q, *e;
int bo = 0; /* assume native ordering by default */
const char *errmsg = "";
- /* On narrow builds we split characters outside the BMP into two
- codepoints => count how much extra space we need. */
-#ifndef Py_UNICODE_WIDE
- for (i = pairs = 0; i < size/4; i++)
- if (((Py_UCS4 *)s)[i] >= 0x10000)
- pairs++;
-#endif
/* Offsets from q for retrieving bytes in the right order. */
#ifdef BYTEORDER_IS_LITTLE_ENDIAN
int iorder[] = {0, 1, 2, 3};
@@ -2039,6 +2032,13 @@ PyUnicode_DecodeUTF32Stateful(const char *s,
#endif
PyObject *errorHandler = NULL;
PyObject *exc = NULL;
+ /* On narrow builds we split characters outside the BMP into two
+ codepoints => count how much extra space we need. */
+#ifndef Py_UNICODE_WIDE
+ for (i = pairs = 0; i < size/4; i++)
+ if (((Py_UCS4 *)s)[i] >= 0x10000)
+ pairs++;
+#endif
/* This might be one to much, because of a BOM */
unicode = _PyUnicode_New((size+3)/4+pairs);