[Python-checkins] CVS: python/dist/src/Objects abstract.c,2.95,2.96

Tim Peters tim_one@users.sourceforge.net
Fri, 01 Mar 2002 20:14:23 -0800


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

Modified Files:
	abstract.c 
Log Message:
Revert the last odd change to PyNumber_Long:  the problem it was trying
to fix was almost certainly a bug in _PyLong_Copy (which I'll fix next).


Index: abstract.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v
retrieving revision 2.95
retrieving revision 2.96
diff -C2 -d -r2.95 -r2.96
*** abstract.c	1 Mar 2002 22:23:53 -0000	2.95
--- abstract.c	2 Mar 2002 04:14:21 -0000	2.96
***************
*** 934,947 ****
  		return o;
  	}
! 	if (PyLong_Check(o)) {
! 		PyObject *res;
! 
! 		res = _PyLong_Copy((PyLongObject *)o);
! 		if (res != NULL)
! 			((PyLongObject *)res)->ob_size =
! 				((PyLongObject *)o)->ob_size;
! 
! 		return res;
! 	}
  	if (PyString_Check(o))
  		/* need to do extra error checking that PyLong_FromString() 
--- 934,939 ----
  		return o;
  	}
! 	if (PyLong_Check(o))
! 		return _PyLong_Copy((PyLongObject *)o);
  	if (PyString_Check(o))
  		/* need to do extra error checking that PyLong_FromString()