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
Kirill Smelkov
cython
Commits
9d493a05
Commit
9d493a05
authored
Dec 28, 2012
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor cleanup.
parent
3ee23f4f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Cython/Utility/Overflow.c
Cython/Utility/Overflow.c
+5
-5
No files found.
Cython/Utility/Overflow.c
View file @
9d493a05
...
...
@@ -78,12 +78,12 @@ static CYTHON_INLINE {{UINT}} __Pyx_sub_{{NAME}}_checking_overflow({{UINT}} a, {
}
static
CYTHON_INLINE
{{
UINT
}}
__Pyx_mul_
{{
NAME
}}
_checking_overflow
({{
UINT
}}
a
,
{{
UINT
}}
b
,
int
*
overflow
)
{
if
(
sizeof
({{
UINT
}})
<
sizeof
(
long
))
{
if
(
sizeof
({{
UINT
}})
<
sizeof
(
unsigned
long
))
{
unsigned
long
big_r
=
((
unsigned
long
)
a
)
*
((
unsigned
long
)
b
);
{{
UINT
}}
r
=
({{
UINT
}})
big_r
;
*
overflow
|=
big_r
!=
r
;
return
r
;
}
else
if
(
sizeof
({{
UINT
}})
<
sizeof
(
long
long
))
{
}
else
if
(
sizeof
({{
UINT
}})
<
sizeof
(
unsigned
long
long
))
{
unsigned
long
long
big_r
=
((
unsigned
long
long
)
a
)
*
((
unsigned
long
long
)
b
);
{{
UINT
}}
r
=
({{
UINT
}})
big_r
;
*
overflow
|=
big_r
!=
r
;
...
...
@@ -247,11 +247,11 @@ static CYTHON_INLINE {{TYPE}} __Pyx_{{BINOP}}_{{NAME}}_checking_overflow({{TYPE}
if
(
sizeof
({{
TYPE
}})
<
sizeof
(
int
))
{
return
__Pyx_
{{
BINOP
}}
_no_overflow
(
a
,
b
,
overflow
);
}
else
if
(
__PYX_IS_UNSIGNED
({{
TYPE
}}))
{
if
(
sizeof
({{
TYPE
}})
==
sizeof
(
int
))
{
if
(
sizeof
({{
TYPE
}})
==
sizeof
(
unsigned
int
))
{
return
__Pyx_
{{
BINOP
}}
_unsigned_int_checking_overflow
(
a
,
b
,
overflow
);
}
else
if
(
sizeof
({{
TYPE
}})
==
sizeof
(
long
))
{
}
else
if
(
sizeof
({{
TYPE
}})
==
sizeof
(
unsigned
long
))
{
return
__Pyx_
{{
BINOP
}}
_unsigned_long_checking_overflow
(
a
,
b
,
overflow
);
}
else
if
(
sizeof
({{
TYPE
}})
==
sizeof
(
long
long
))
{
}
else
if
(
sizeof
({{
TYPE
}})
==
sizeof
(
unsigned
long
long
))
{
return
__Pyx_
{{
BINOP
}}
_unsigned_long_long_checking_overflow
(
a
,
b
,
overflow
);
}
else
{
abort
();
return
0
;
// handled elsewhere
...
...
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