summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-10-05 20:21:03 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-10-05 20:21:03 (GMT)
commitc1e6d969ba514b21b2ca2b1bda1968717b6c3c64 (patch)
treed0e21ae90572394b867ef6f3225a05398aeaab68 /Python
parent9835206268e9f2687f2514ad726bb105077fcb75 (diff)
downloadcpython-c1e6d969ba514b21b2ca2b1bda1968717b6c3c64.zip
cpython-c1e6d969ba514b21b2ca2b1bda1968717b6c3c64.tar.gz
cpython-c1e6d969ba514b21b2ca2b1bda1968717b6c3c64.tar.bz2
Get rid of unique local ISSTRICTINT macro in favor of std PyInt_CheckExact.
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index bccd90d..b3e35c2 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -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;