[Python-checkins] CVS: python/dist/src/Objects abstract.c,2.68,2.69 tupleobject.c,2.50,2.51

Tim Peters tim_one@users.sourceforge.net
Mon, 28 May 2001 15:30:10 -0700


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

Modified Files:
	abstract.c tupleobject.c 
Log Message:
Cruft cleanup:  Removed the unused last_is_sticky argument from the internal
_PyTuple_Resize().


Index: abstract.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v
retrieving revision 2.68
retrieving revision 2.69
diff -C2 -r2.68 -r2.69
*** abstract.c	2001/05/05 21:05:01	2.68
--- abstract.c	2001/05/28 22:30:08	2.69
***************
*** 1221,1225 ****
  			else
  				n += 100;
! 			if (_PyTuple_Resize(&result, n, 0) != 0) {
  				Py_DECREF(item);
  				goto Fail;
--- 1221,1225 ----
  			else
  				n += 100;
! 			if (_PyTuple_Resize(&result, n) != 0) {
  				Py_DECREF(item);
  				goto Fail;
***************
*** 1231,1235 ****
  	/* Cut tuple back if guess was too large. */
  	if (j < n &&
! 	    _PyTuple_Resize(&result, j, 0) != 0)
  		goto Fail;
  
--- 1231,1235 ----
  	/* Cut tuple back if guess was too large. */
  	if (j < n &&
! 	    _PyTuple_Resize(&result, j) != 0)
  		goto Fail;
  

Index: tupleobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/tupleobject.c,v
retrieving revision 2.50
retrieving revision 2.51
diff -C2 -r2.50 -r2.51
*** tupleobject.c	2001/05/28 13:11:02	2.50
--- tupleobject.c	2001/05/28 22:30:08	2.51
***************
*** 489,497 ****
     as creating a new tuple object and destroying the old one, only more
     efficiently.  In any case, don't use this if the tuple may already be
!    known to some other part of the code.  The last_is_sticky is not used
!    and must always be false. */
  
  int
! _PyTuple_Resize(PyObject **pv, int newsize, int last_is_sticky)
  {
  	register PyTupleObject *v;
--- 489,496 ----
     as creating a new tuple object and destroying the old one, only more
     efficiently.  In any case, don't use this if the tuple may already be
!    known to some other part of the code. */
  
  int
! _PyTuple_Resize(PyObject **pv, int newsize)
  {
  	register PyTupleObject *v;
***************
*** 501,505 ****
  
  	v = (PyTupleObject *) *pv;
! 	if (v == NULL || !PyTuple_Check(v) || last_is_sticky ||
  	    (v->ob_size != 0 && v->ob_refcnt != 1)) {
  		*pv = 0;
--- 500,504 ----
  
  	v = (PyTupleObject *) *pv;
! 	if (v == NULL || !PyTuple_Check(v) ||
  	    (v->ob_size != 0 && v->ob_refcnt != 1)) {
  		*pv = 0;