From: Walter Dörwald Date: Fri, 17 Aug 2007 16:52:50 +0000 (+0000) Subject: Move variable declaration up. X-Git-Tag: v2.6a1~1486 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=20b40d3bce51b099763b196e60d574ccd4530e23;p=python Move variable declaration up. --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index b78bfc04b3..3e583d79bb 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -1536,18 +1536,18 @@ 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 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}; -#else - int iorder[] = {3, 2, 1, 0}; #endif PyObject *errorHandler = NULL; PyObject *exc = NULL;