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
85cc4d89
Commit
85cc4d89
authored
Jul 06, 2000
by
Marc-André Lemburg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a couple of places where 'int' was used where 'long'
should have been used.
parent
49b0c3ba
Changes
1
Hide 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 @
85cc4d89
...
...
@@ -770,7 +770,7 @@ PyObject *PyUnicode_EncodeUTF8(const Py_UNICODE *s,
*/
PyObject
*
_PyUnicode_AsUTF8String
(
PyObject
*
unicode
,
const
char
*
errors
)
const
char
*
errors
)
{
PyObject
*
v
=
((
PyUnicodeObject
*
)
unicode
)
->
utf8str
;
...
...
@@ -1063,7 +1063,7 @@ PyObject *PyUnicode_DecodeUnicodeEscape(const char *s,
end
=
s
+
size
;
while
(
s
<
end
)
{
unsigned
char
c
;
unsigned
int
x
;
unsigned
long
x
;
int
i
;
/* Non-escape characters are interpreted as Unicode ordinals */
...
...
@@ -1372,7 +1372,7 @@ PyObject *PyUnicode_DecodeRawUnicodeEscape(const char *s,
end
=
s
+
size
;
while
(
s
<
end
)
{
unsigned
char
c
;
unsigned
int
x
;
unsigned
long
x
;
int
i
;
/* Non-escape characters are interpreted as Unicode ordinals */
...
...
@@ -1852,7 +1852,7 @@ PyObject *PyUnicode_DecodeCharmap(const char *s,
/* Apply mapping */
if
(
PyInt_Check
(
x
))
{
int
value
=
PyInt_AS_LONG
(
x
);
long
value
=
PyInt_AS_LONG
(
x
);
if
(
value
<
0
||
value
>
65535
)
{
PyErr_SetString
(
PyExc_TypeError
,
"character mapping must be in range(65536)"
);
...
...
@@ -1971,7 +1971,7 @@ PyObject *PyUnicode_EncodeCharmap(const Py_UNICODE *p,
/* Apply mapping */
if
(
PyInt_Check
(
x
))
{
int
value
=
PyInt_AS_LONG
(
x
);
long
value
=
PyInt_AS_LONG
(
x
);
if
(
value
<
0
||
value
>
255
)
{
PyErr_SetString
(
PyExc_TypeError
,
"character mapping must be in range(256)"
);
...
...
@@ -3070,7 +3070,7 @@ unicode_compare(PyUnicodeObject *str1, PyUnicodeObject *str2)
while
(
len1
>
0
&&
len2
>
0
)
{
unsigned
short
c1
,
c2
;
/* 16 bits */
int
diff
;
/*
32 bits */
long
diff
;
/* >=
32 bits */
c1
=
*
s1
++
;
c2
=
*
s2
++
;
...
...
@@ -3080,7 +3080,7 @@ unicode_compare(PyUnicodeObject *str1, PyUnicodeObject *str2)
c2
+=
utf16Fixup
[
c2
>>
11
];
/* now c1 and c2 are in UTF-32-compatible order */
diff
=
(
int
)
c1
-
(
int
)
c2
;
diff
=
(
long
)
c1
-
(
long
)
c2
;
if
(
diff
)
return
(
diff
<
0
)
?
-
1
:
(
diff
!=
0
);
len1
--
;
len2
--
;
...
...
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