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
22ff664f
Commit
22ff664f
authored
May 08, 2010
by
Mark Dickinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #8659: Remove redundant ABS calls. Thanks Daniel Stutzbach.
parent
18e4dd74
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
Objects/longobject.c
Objects/longobject.c
+2
-5
No files found.
Objects/longobject.c
View file @
22ff664f
...
...
@@ -2354,10 +2354,7 @@ long_compare(PyLongObject *a, PyLongObject *b)
Py_ssize_t
sign
;
if
(
Py_SIZE
(
a
)
!=
Py_SIZE
(
b
))
{
if
(
ABS
(
Py_SIZE
(
a
))
==
0
&&
ABS
(
Py_SIZE
(
b
))
==
0
)
sign
=
0
;
else
sign
=
Py_SIZE
(
a
)
-
Py_SIZE
(
b
);
sign
=
Py_SIZE
(
a
)
-
Py_SIZE
(
b
);
}
else
{
Py_ssize_t
i
=
ABS
(
Py_SIZE
(
a
));
...
...
@@ -3606,7 +3603,7 @@ long_abs(PyLongObject *v)
static
int
long_nonzero
(
PyLongObject
*
v
)
{
return
ABS
(
Py_SIZE
(
v
)
)
!=
0
;
return
Py_SIZE
(
v
)
!=
0
;
}
static
PyObject
*
...
...
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