[Python-checkins] CVS: python/dist/src/Modules cPickle.c,2.63,2.64

Tim Peters tim_one@users.sourceforge.net
2001年8月28日 15:08:37 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv13465/python/modules
Modified Files:
	cPickle.c 
Log Message:
load_int: The fallback to long ints was coded in such a way that it
couldn't succeed. Fixed.
Index: cPickle.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v
retrieving revision 2.63
retrieving revision 2.64
diff -C2 -d -r2.63 -r2.64
*** cPickle.c	2001年08月18日 21:22:07	2.63
--- cPickle.c	2001年08月28日 22:08:34	2.64
***************
*** 2543,2550 ****
 /* Hm, maybe we've got something long. Let's try reading
 it as a Python long object. */
! errno=0;
! UNLESS (py_int=PyLong_FromString(s,&endptr,0)) goto finally;
! 
! if ((*endptr != '\n') || (endptr[1] != '0円')) {
 PyErr_SetString(PyExc_ValueError,
 "could not convert string to int");
--- 2543,2549 ----
 /* Hm, maybe we've got something long. Let's try reading
 it as a Python long object. */
! errno = 0;
! py_int = PyLong_FromString(s, NULL, 0);
! if (py_int == NULL) {
 PyErr_SetString(PyExc_ValueError,
 "could not convert string to int");

AltStyle によって変換されたページ (->オリジナル) /