Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xavier Thompson
cython
Commits
da191732
Commit
da191732
authored
6 years ago
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply some type casts for safety.
parent
52097ca3
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Cython/Utility/Optimize.c
Cython/Utility/Optimize.c
+3
-3
No files found.
Cython/Utility/Optimize.c
View file @
da191732
...
@@ -761,11 +761,11 @@ static CYTHON_INLINE {{c_ret_type}} __Pyx_PyInt_{{'' if ret_type.is_pyobject els
...
@@ -761,11 +761,11 @@ static CYTHON_INLINE {{c_ret_type}} __Pyx_PyInt_{{'' if ret_type.is_pyobject els
{{
for
_size
in
range
(
4
,
1
,
-
1
)}}
{{
for
_size
in
range
(
4
,
1
,
-
1
)}}
#if PyLong_SHIFT * {{_size}} < SIZEOF_LONG*8
#if PyLong_SHIFT * {{_size}} < SIZEOF_LONG*8
else
if
(
uintval
>=
{{
_size
-
1
}}
UL
*
(
unsigned
long
)
PyLong_BASE
)
else
if
(
uintval
>=
{{
_size
-
1
}}
UL
*
(
unsigned
long
)
PyLong_BASE
)
unequal
=
(
size
!=
{{
_size
}})
||
(
digits
[
0
]
!=
(
uintval
&
PyLong_MASK
))
unequal
=
(
size
!=
{{
_size
}})
||
(
digits
[
0
]
!=
(
uintval
&
(
unsigned
long
)
PyLong_MASK
))
{{
for
_i
in
range
(
1
,
_size
)}}
|
(
digits
[{{
_i
}}]
!=
((
uintval
>>
({{
_i
}}
*
PyLong_SHIFT
))
&
PyLong_MASK
)){{
endfor
}};
{{
for
_i
in
range
(
1
,
_size
)}}
|
(
digits
[{{
_i
}}]
!=
((
uintval
>>
({{
_i
}}
*
PyLong_SHIFT
))
&
(
unsigned
long
)
PyLong_MASK
)){{
endfor
}};
#endif
#endif
{{
endfor
}}
{{
endfor
}}
else
unequal
=
(
size
!=
1
)
||
(
digits
[
0
]
!=
(
uintval
&
PyLong_MASK
));
else
unequal
=
(
size
!=
1
)
||
(
digits
[
0
]
!=
(
uintval
&
(
unsigned
long
)
PyLong_MASK
));
{{
return_compare
(
'
unequal
'
,
'0'
,
c_op
)}}
{{
return_compare
(
'
unequal
'
,
'0'
,
c_op
)}}
}
}
...
...
This diff is collapsed.
Click to expand it.
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