[Python-checkins] r57147 - python/trunk/Objects/unicodeobject.c

walter.doerwald python-checkins at python.org
Fri Aug 17 18:53:26 CEST 2007


Author: walter.doerwald
Date: Fri Aug 17 18:52:50 2007
New Revision: 57147

Modified:
   python/trunk/Objects/unicodeobject.c
Log:
Move variable declaration up.


Modified: python/trunk/Objects/unicodeobject.c
==============================================================================
--- python/trunk/Objects/unicodeobject.c	(original)
+++ python/trunk/Objects/unicodeobject.c	Fri Aug 17 18:52:50 2007
@@ -1536,6 +1536,12 @@
     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 @@
 	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;
 


More information about the Python-checkins mailing list