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
c1e6d969
Commit
c1e6d969
authored
Oct 05, 2001
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of unique local ISSTRICTINT macro in favor of std PyInt_CheckExact.
parent
98352062
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
Python/ceval.c
Python/ceval.c
+6
-9
No files found.
Python/ceval.c
View file @
c1e6d969
...
...
@@ -549,9 +549,6 @@ eval_frame(PyFrameObject *f)
#define POP() BASIC_POP()
#endif
/* Strict int check macros */
#define ISSTRICTINT(v) ((v)->ob_type == &PyInt_Type)
/* Local variable macros */
#define GETLOCAL(i) (fastlocals[i])
...
...
@@ -946,7 +943,7 @@ eval_frame(PyFrameObject *f)
case
BINARY_ADD
:
w
=
POP
();
v
=
POP
();
if
(
ISSTRICTINT
(
v
)
&&
ISSTRICTINT
(
w
))
{
if
(
PyInt_CheckExact
(
v
)
&&
PyInt_CheckExact
(
w
))
{
/* INLINE: int + int */
register
long
a
,
b
,
i
;
a
=
PyInt_AS_LONG
(
v
);
...
...
@@ -969,7 +966,7 @@ eval_frame(PyFrameObject *f)
case
BINARY_SUBTRACT
:
w
=
POP
();
v
=
POP
();
if
(
ISSTRICTINT
(
v
)
&&
ISSTRICTINT
(
w
))
{
if
(
PyInt_CheckExact
(
v
)
&&
PyInt_CheckExact
(
w
))
{
/* INLINE: int - int */
register
long
a
,
b
,
i
;
a
=
PyInt_AS_LONG
(
v
);
...
...
@@ -992,7 +989,7 @@ eval_frame(PyFrameObject *f)
case
BINARY_SUBSCR
:
w
=
POP
();
v
=
POP
();
if
(
v
->
ob_type
==
&
PyList_Type
&&
ISSTRICTINT
(
w
))
{
if
(
v
->
ob_type
==
&
PyList_Type
&&
PyInt_CheckExact
(
w
))
{
/* INLINE: list[int] */
long
i
=
PyInt_AsLong
(
w
);
if
(
i
<
0
)
...
...
@@ -1129,7 +1126,7 @@ eval_frame(PyFrameObject *f)
case
INPLACE_ADD
:
w
=
POP
();
v
=
POP
();
if
(
ISSTRICTINT
(
v
)
&&
ISSTRICTINT
(
w
))
{
if
(
PyInt_CheckExact
(
v
)
&&
PyInt_CheckExact
(
w
))
{
/* INLINE: int + int */
register
long
a
,
b
,
i
;
a
=
PyInt_AS_LONG
(
v
);
...
...
@@ -1152,7 +1149,7 @@ eval_frame(PyFrameObject *f)
case
INPLACE_SUBTRACT
:
w
=
POP
();
v
=
POP
();
if
(
ISSTRICTINT
(
v
)
&&
ISSTRICTINT
(
w
))
{
if
(
PyInt_CheckExact
(
v
)
&&
PyInt_CheckExact
(
w
))
{
/* INLINE: int - int */
register
long
a
,
b
,
i
;
a
=
PyInt_AS_LONG
(
v
);
...
...
@@ -1759,7 +1756,7 @@ eval_frame(PyFrameObject *f)
case
COMPARE_OP
:
w
=
POP
();
v
=
POP
();
if
(
ISSTRICTINT
(
v
)
&&
ISSTRICTINT
(
w
))
{
if
(
PyInt_CheckExact
(
v
)
&&
PyInt_CheckExact
(
w
))
{
/* INLINE: cmp(int, int) */
register
long
a
,
b
;
register
int
res
;
...
...
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