[Python-3000-checkins] r57144 - python/branches/py3k/Objects/unicodeobject.c
guido.van.rossum
python-3000-checkins at python.org
Fri Aug 17 17:41:22 CEST 2007
Author: guido.van.rossum
Date: Fri Aug 17 17:41:00 2007
New Revision: 57144
Modified:
python/branches/py3k/Objects/unicodeobject.c
Log:
Move some declarations before code, to compile with GCC 2.95.
Modified: python/branches/py3k/Objects/unicodeobject.c
==============================================================================
--- python/branches/py3k/Objects/unicodeobject.c (original)
+++ python/branches/py3k/Objects/unicodeobject.c Fri Aug 17 17:41:00 2007
@@ -2024,13 +2024,6 @@
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 @@
#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);
More information about the Python-3000-checkins
mailing list