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
Gwenaël Samain
cython
Commits
da191732
Commit
da191732
authored
Apr 10, 2018
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply some type casts for safety.
parent
52097ca3
Changes
1
Show 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
{{
for
_size
in
range
(
4
,
1
,
-
1
)}}
#if PyLong_SHIFT * {{_size}} < SIZEOF_LONG*8
else
if
(
uintval
>=
{{
_size
-
1
}}
UL
*
(
unsigned
long
)
PyLong_BASE
)
unequal
=
(
size
!=
{{
_size
}})
||
(
digits
[
0
]
!=
(
uintval
&
PyLong_MASK
))
{{
for
_i
in
range
(
1
,
_size
)}}
|
(
digits
[{{
_i
}}]
!=
((
uintval
>>
({{
_i
}}
*
PyLong_SHIFT
))
&
PyLong_MASK
)){{
endfor
}};
unequal
=
(
size
!=
{{
_size
}})
||
(
digits
[
0
]
!=
(
uintval
&
(
unsigned
long
)
PyLong_MASK
))
{{
for
_i
in
range
(
1
,
_size
)}}
|
(
digits
[{{
_i
}}]
!=
((
uintval
>>
({{
_i
}}
*
PyLong_SHIFT
))
&
(
unsigned
long
)
PyLong_MASK
)){{
endfor
}};
#endif
{{
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
)}}
}
...
...
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