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

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


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

Modified Files:
	ceval.c 
Log Message:
Introduced the oddly-missing PyList_CheckExact(), and used it to replace
a hard-coded type check.


Index: ceval.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v
retrieving revision 2.282
retrieving revision 2.283
diff -C2 -d -r2.282 -r2.283
*** ceval.c	2001/10/05 20:21:03	2.282
--- ceval.c	2001/10/05 20:41:38	2.283
***************
*** 990,994 ****
  			w = POP();
  			v = POP();
! 			if (v->ob_type == &PyList_Type && PyInt_CheckExact(w)) {
  				/* INLINE: list[int] */
  				long i = PyInt_AsLong(w);
--- 990,994 ----
  			w = POP();
  			v = POP();
! 			if (PyList_CheckExact(v) && PyInt_CheckExact(w)) {
  				/* INLINE: list[int] */
  				long i = PyInt_AsLong(w);