[Python-checkins] python/dist/src/Objects rangeobject.c,2.51,2.52

tim_one at users.sourceforge.net tim_one at users.sourceforge.net
Sun Aug 8 08:29:13 CEST 2004


Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27686/Objects

Modified Files:
	rangeobject.c 
Log Message:
Trimmed trailing whitespace.


Index: rangeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/rangeobject.c,v
retrieving revision 2.51
retrieving revision 2.52
diff -C2 -d -r2.51 -r2.52
*** rangeobject.c	2 Aug 2004 13:22:01 -0000	2.51
--- rangeobject.c	8 Aug 2004 06:29:10 -0000	2.52
***************
*** 33,37 ****
  		long last = start + (len - 1) * step;
  		if ((step > 0) ?
! 		    (last > (PyInt_GetMax() - step)) : 
  		    (last < (-1 - PyInt_GetMax() - step))) {
  			PyErr_SetString(PyExc_OverflowError,
--- 33,37 ----
  		long last = start + (len - 1) * step;
  		if ((step > 0) ?
! 		    (last > (PyInt_GetMax() - step)) :
  		    (last < (-1 - PyInt_GetMax() - step))) {
  			PyErr_SetString(PyExc_OverflowError,
***************
*** 39,43 ****
  			Py_DECREF(obj);
  			return NULL;
! 		}			
  	}
  	obj->start = start;
--- 39,43 ----
  			Py_DECREF(obj);
  			return NULL;
! 		}
  	}
  	obj->start = start;
***************
*** 146,150 ****
  {
  	PyObject *rtn;
! 	
  	if (r->start == 0 && r->step == 1)
  		rtn = PyString_FromFormat("xrange(%ld)",
--- 146,150 ----
  {
  	PyObject *rtn;
! 
  	if (r->start == 0 && r->step == 1)
  		rtn = PyString_FromFormat("xrange(%ld)",
***************
*** 212,216 ****
  	(getiterfunc)range_iter,	/* tp_iter */
  	0,				/* tp_iternext */
! 	range_methods,			/* tp_methods */	
  	0,				/* tp_members */
  	0,				/* tp_getset */
--- 212,216 ----
  	(getiterfunc)range_iter,	/* tp_iter */
  	0,				/* tp_iternext */
! 	range_methods,			/* tp_methods */
  	0,				/* tp_members */
  	0,				/* tp_getset */
***************
*** 285,289 ****
  rangeiter_next(rangeiterobject *r)
  {
! 	if (r->index < r->len) 
  		return PyInt_FromLong(r->start + (r->index++) * r->step);
  	return NULL;
--- 285,289 ----
  rangeiter_next(rangeiterobject *r)
  {
! 	if (r->index < r->len)
  		return PyInt_FromLong(r->start + (r->index++) * r->step);
  	return NULL;



More information about the Python-checkins mailing list