summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2007-08-17 16:52:50 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2007-08-17 16:52:50 (GMT)
commit20b40d3bce51b099763b196e60d574ccd4530e23 (patch)
tree25be70d80d2dae4ee65afdf2a617d24144075575 /Objects
parent6e390806495cf30c836615996b94e5ffa258cbef (diff)
downloadcpython-20b40d3bce51b099763b196e60d574ccd4530e23.zip
cpython-20b40d3bce51b099763b196e60d574ccd4530e23.tar.gz
cpython-20b40d3bce51b099763b196e60d574ccd4530e23.tar.bz2
Move variable declaration up.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index b78bfc0..3e583d7 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -1536,6 +1536,12 @@ PyUnicode_DecodeUTF32Stateful(const char *s,
const unsigned char *q, *e;
int bo = 0; /* assume native ordering by default */
const char *errmsg = "";
+ /* Offsets from q for retrieving bytes in the right order. */
+#ifdef BYTEORDER_IS_LITTLE_ENDIAN
+ int iorder[] = {0, 1, 2, 3};
+#else
+ int iorder[] = {3, 2, 1, 0};
+#endif
/* On narrow builds we split characters outside the BMP into two
codepoints => count how much extra space we need. */
#ifndef Py_UNICODE_WIDE
@@ -1543,12 +1549,6 @@ PyUnicode_DecodeUTF32Stateful(const char *s,
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};
-#else
- int iorder[] = {3, 2, 1, 0};
-#endif
PyObject *errorHandler = NULL;
PyObject *exc = NULL;