[Python-checkins] CVS: python/dist/src/Objects longobject.c,1.112.8.1,1.112.8.2
Michael Hudson
mwh@users.sourceforge.net
2002年3月05日 07:42:50 -0800
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv17502
Modified Files:
Tag: release22-maint
longobject.c
Log Message:
backport tim_one's checkin of
revision 1.114 of longobject.c
_PyLong_Copy(): was creating a copy of the absolute value, but should
copy the sign too. Added a test to test_descr to ensure that it does.
Bugfix candidate.
Index: longobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v
retrieving revision 1.112.8.1
retrieving revision 1.112.8.2
diff -C2 -d -r1.112.8.1 -r1.112.8.2
*** longobject.c 16 Feb 2002 23:41:39 -0000 1.112.8.1
--- longobject.c 5 Mar 2002 15:42:48 -0000 1.112.8.2
***************
*** 64,68 ****
result = _PyLong_New(i);
if (result != NULL) {
! result->ob_size = i;
while (--i >= 0)
result->ob_digit[i] = src->ob_digit[i];
--- 64,68 ----
result = _PyLong_New(i);
if (result != NULL) {
! result->ob_size = src->ob_size;
while (--i >= 0)
result->ob_digit[i] = src->ob_digit[i];