Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
8d991ed2
Commit
8d991ed2
authored
Aug 17, 2007
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move some declarations before code, to compile with GCC 2.95.
parent
76f2b241
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
Objects/unicodeobject.c
Objects/unicodeobject.c
+7
-7
No files found.
Objects/unicodeobject.c
View file @
8d991ed2
...
...
@@ -2024,13 +2024,6 @@ PyUnicode_DecodeUTF32Stateful(const char *s,
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 @@ PyUnicode_DecodeUTF32Stateful(const char *s,
#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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment