[Python-checkins] CVS: python/dist/src/Python ceval.c,2.281,2.282

Tim Peters tim_one@users.sourceforge.net
Fri, 05 Oct 2001 13:21:06 -0700


Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv19085/python/Python

Modified Files:
	ceval.c 
Log Message:
Get rid of unique local ISSTRICTINT macro in favor of std PyInt_CheckExact.


Index: ceval.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v
retrieving revision 2.281
retrieving revision 2.282
diff -C2 -d -r2.281 -r2.282
*** ceval.c	2001/10/04 19:26:43	2.281
--- ceval.c	2001/10/05 20:21:03	2.282
***************
*** 550,556 ****
  #endif
  
- /* Strict int check macros */
- #define ISSTRICTINT(v)	((v)->ob_type == &PyInt_Type)
- 
  /* Local variable macros */
  
--- 550,553 ----
***************
*** 947,951 ****
  			w = POP();
  			v = POP();
! 			if (ISSTRICTINT(v) && ISSTRICTINT(w)) {
  				/* INLINE: int + int */
  				register long a, b, i;
--- 944,948 ----
  			w = POP();
  			v = POP();
! 			if (PyInt_CheckExact(v) && PyInt_CheckExact(w)) {
  				/* INLINE: int + int */
  				register long a, b, i;
***************
*** 970,974 ****
  			w = POP();
  			v = POP();
! 			if (ISSTRICTINT(v) && ISSTRICTINT(w)) {
  				/* INLINE: int - int */
  				register long a, b, i;
--- 967,971 ----
  			w = POP();
  			v = POP();
! 			if (PyInt_CheckExact(v) && PyInt_CheckExact(w)) {
  				/* INLINE: int - int */
  				register long a, b, i;
***************
*** 993,997 ****
  			w = POP();
  			v = POP();
! 			if (v->ob_type == &PyList_Type && ISSTRICTINT(w)) {
  				/* INLINE: list[int] */
  				long i = PyInt_AsLong(w);
--- 990,994 ----
  			w = POP();
  			v = POP();
! 			if (v->ob_type == &PyList_Type && PyInt_CheckExact(w)) {
  				/* INLINE: list[int] */
  				long i = PyInt_AsLong(w);
***************
*** 1130,1134 ****
  			w = POP();
  			v = POP();
! 			if (ISSTRICTINT(v) && ISSTRICTINT(w)) {
  				/* INLINE: int + int */
  				register long a, b, i;
--- 1127,1131 ----
  			w = POP();
  			v = POP();
! 			if (PyInt_CheckExact(v) && PyInt_CheckExact(w)) {
  				/* INLINE: int + int */
  				register long a, b, i;
***************
*** 1153,1157 ****
  			w = POP();
  			v = POP();
! 			if (ISSTRICTINT(v) && ISSTRICTINT(w)) {
  				/* INLINE: int - int */
  				register long a, b, i;
--- 1150,1154 ----
  			w = POP();
  			v = POP();
! 			if (PyInt_CheckExact(v) && PyInt_CheckExact(w)) {
  				/* INLINE: int - int */
  				register long a, b, i;
***************
*** 1760,1764 ****
  			w = POP();
  			v = POP();
! 			if (ISSTRICTINT(v) && ISSTRICTINT(w)) {
  				/* INLINE: cmp(int, int) */
  				register long a, b;
--- 1757,1761 ----
  			w = POP();
  			v = POP();
! 			if (PyInt_CheckExact(v) && PyInt_CheckExact(w)) {
  				/* INLINE: cmp(int, int) */
  				register long a, b;