[Python-checkins] CVS: python/dist/src/Objects intobject.c,2.41,2.42

Guido van Rossum python-dev@python.org
Tue, 9 May 2000 10:27:51 -0400 (EDT)


Update of /projects/cvsroot/python/dist/src/Objects
In directory eric:/projects/python/develop/guido/src/Objects

Modified Files:
	intobject.c 
Log Message:
Replace PyErr_BadArgument() error in PyInt_AsLong() with "an integer
is required" (we can't say more because we don't know in which context
it is called).


Index: intobject.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Objects/intobject.c,v
retrieving revision 2.41
retrieving revision 2.42
diff -C2 -r2.41 -r2.42
*** intobject.c	2000/05/03 23:44:35	2.41
--- intobject.c	2000/05/09 14:27:48	2.42
***************
*** 199,203 ****
  	if (op == NULL || (nb = op->ob_type->tp_as_number) == NULL ||
  	    nb->nb_int == NULL) {
! 		PyErr_BadArgument();
  		return -1;
  	}
--- 199,203 ----
  	if (op == NULL || (nb = op->ob_type->tp_as_number) == NULL ||
  	    nb->nb_int == NULL) {
! 		PyErr_SetString(PyExc_TypeError, "an integer is required");
  		return -1;
  	}