Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 20273:2269cb371e05 legacy-trunk
Get rid of unique local ISSTRICTINT macro in favor of std PyInt_CheckExact.
| author | Tim Peters <tim.peters@gmail.com> |
|---|---|
| date | Fri, 05 Oct 2001 20:21:03 +0000 |
| parents | e3f63a95455f |
| children | 167e7f98b51f |
line wrap: on
line diff
--- a/Python/ceval.c Fri Oct 05 20:06:47 2001 +0000 +++ b/Python/ceval.c Fri Oct 05 20:21:03 2001 +0000 @@ -549,9 +549,6 @@ #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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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;
