Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8d991ed

Browse files
committed
Move some declarations before code, to compile with GCC 2.95.
1 parent 76f2b24 commit 8d991ed

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Objects/unicodeobject.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2024,13 +2024,6 @@ PyUnicode_DecodeUTF32Stateful(const char *s,
20242024
const unsigned char *q, *e;
20252025
int bo = 0; /* assume native ordering by default */
20262026
const char *errmsg = "";
2027-
/* On narrow builds we split characters outside the BMP into two
2028-
codepoints => count how much extra space we need. */
2029-
#ifndef Py_UNICODE_WIDE
2030-
for (i = pairs = 0; i < size/4; i++)
2031-
if (((Py_UCS4 *)s)[i] >= 0x10000)
2032-
pairs++;
2033-
#endif
20342027
/* Offsets from q for retrieving bytes in the right order. */
20352028
#ifdef BYTEORDER_IS_LITTLE_ENDIAN
20362029
int iorder[] = {0, 1, 2, 3};
@@ -2039,6 +2032,13 @@ PyUnicode_DecodeUTF32Stateful(const char *s,
20392032
#endif
20402033
PyObject *errorHandler = NULL;
20412034
PyObject *exc = NULL;
2035+
/* On narrow builds we split characters outside the BMP into two
2036+
codepoints => count how much extra space we need. */
2037+
#ifndef Py_UNICODE_WIDE
2038+
for (i = pairs = 0; i < size/4; i++)
2039+
if (((Py_UCS4 *)s)[i] >= 0x10000)
2040+
pairs++;
2041+
#endif
20422042

20432043
/* This might be one to much, because of a BOM */
20442044
unicode = _PyUnicode_New((size+3)/4+pairs);

0 commit comments

Comments
 (0)