Commit c1e6d969 authored by Tim Peters's avatar Tim Peters

Get rid of unique local ISSTRICTINT macro in favor of std PyInt_CheckExact.

parent 98352062
...@@ -549,9 +549,6 @@ eval_frame(PyFrameObject *f) ...@@ -549,9 +549,6 @@ eval_frame(PyFrameObject *f)
#define POP() BASIC_POP() #define POP() BASIC_POP()
#endif #endif
/* Strict int check macros */
#define ISSTRICTINT(v) ((v)->ob_type == &PyInt_Type)
/* Local variable macros */ /* Local variable macros */
#define GETLOCAL(i) (fastlocals[i]) #define GETLOCAL(i) (fastlocals[i])
...@@ -946,7 +943,7 @@ eval_frame(PyFrameObject *f) ...@@ -946,7 +943,7 @@ eval_frame(PyFrameObject *f)
case BINARY_ADD: case BINARY_ADD:
w = POP(); w = POP();
v = POP(); v = POP();
if (ISSTRICTINT(v) && ISSTRICTINT(w)) { if (PyInt_CheckExact(v) && PyInt_CheckExact(w)) {
/* INLINE: int + int */ /* INLINE: int + int */
register long a, b, i; register long a, b, i;
a = PyInt_AS_LONG(v); a = PyInt_AS_LONG(v);
...@@ -969,7 +966,7 @@ eval_frame(PyFrameObject *f) ...@@ -969,7 +966,7 @@ eval_frame(PyFrameObject *f)
case BINARY_SUBTRACT: case BINARY_SUBTRACT:
w = POP(); w = POP();
v = POP(); v = POP();
if (ISSTRICTINT(v) && ISSTRICTINT(w)) { if (PyInt_CheckExact(v) && PyInt_CheckExact(w)) {
/* INLINE: int - int */ /* INLINE: int - int */
register long a, b, i; register long a, b, i;
a = PyInt_AS_LONG(v); a = PyInt_AS_LONG(v);
...@@ -992,7 +989,7 @@ eval_frame(PyFrameObject *f) ...@@ -992,7 +989,7 @@ eval_frame(PyFrameObject *f)
case BINARY_SUBSCR: case BINARY_SUBSCR:
w = POP(); w = POP();
v = POP(); v = POP();
if (v->ob_type == &PyList_Type && ISSTRICTINT(w)) { if (v->ob_type == &PyList_Type && PyInt_CheckExact(w)) {
/* INLINE: list[int] */ /* INLINE: list[int] */
long i = PyInt_AsLong(w); long i = PyInt_AsLong(w);
if (i < 0) if (i < 0)
...@@ -1129,7 +1126,7 @@ eval_frame(PyFrameObject *f) ...@@ -1129,7 +1126,7 @@ eval_frame(PyFrameObject *f)
case INPLACE_ADD: case INPLACE_ADD:
w = POP(); w = POP();
v = POP(); v = POP();
if (ISSTRICTINT(v) && ISSTRICTINT(w)) { if (PyInt_CheckExact(v) && PyInt_CheckExact(w)) {
/* INLINE: int + int */ /* INLINE: int + int */
register long a, b, i; register long a, b, i;
a = PyInt_AS_LONG(v); a = PyInt_AS_LONG(v);
...@@ -1152,7 +1149,7 @@ eval_frame(PyFrameObject *f) ...@@ -1152,7 +1149,7 @@ eval_frame(PyFrameObject *f)
case INPLACE_SUBTRACT: case INPLACE_SUBTRACT:
w = POP(); w = POP();
v = POP(); v = POP();
if (ISSTRICTINT(v) && ISSTRICTINT(w)) { if (PyInt_CheckExact(v) && PyInt_CheckExact(w)) {
/* INLINE: int - int */ /* INLINE: int - int */
register long a, b, i; register long a, b, i;
a = PyInt_AS_LONG(v); a = PyInt_AS_LONG(v);
...@@ -1759,7 +1756,7 @@ eval_frame(PyFrameObject *f) ...@@ -1759,7 +1756,7 @@ eval_frame(PyFrameObject *f)
case COMPARE_OP: case COMPARE_OP:
w = POP(); w = POP();
v = POP(); v = POP();
if (ISSTRICTINT(v) && ISSTRICTINT(w)) { if (PyInt_CheckExact(v) && PyInt_CheckExact(w)) {
/* INLINE: cmp(int, int) */ /* INLINE: cmp(int, int) */
register long a, b; register long a, b;
register int res; register int res;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment