[Python-checkins] python/dist/src/Modules cPickle.c,2.117,2.118
tim_one@users.sourceforge.net
tim_one@users.sourceforge.net
Mon, 03 Feb 2003 14:07:30 -0800
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv8214/Modules
Modified Files:
cPickle.c
Log Message:
load_counted_long(): Changed a ValueError to an UnpicklingError, just
because it seems more consistent with the rest of the code.
cPickle_PyMapping_HasKey(): This extern function isn't used anywhere in
Python or Zope, so got rid of it.
Index: cPickle.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v
retrieving revision 2.117
retrieving revision 2.118
diff -C2 -d -r2.117 -r2.118
*** cPickle.c 3 Feb 2003 15:45:56 -0000 2.117
--- cPickle.c 3 Feb 2003 22:07:24 -0000 2.118
***************
*** 361,378 ****
static int put2(Picklerobject *, PyObject *);
- int
- cPickle_PyMapping_HasKey(PyObject *o, PyObject *key)
- {
- PyObject *v;
-
- if ((v = PyObject_GetItem(o,key))) {
- Py_DECREF(v);
- return 1;
- }
-
- PyErr_Clear();
- return 0;
- }
-
static
PyObject *
--- 361,364 ----
***************
*** 3023,3027 ****
* this.
*/
! PyErr_SetString(PyExc_ValueError, "LONG pickle has negative "
"byte count");
return -1;
--- 3009,3013 ----
* this.
*/
! PyErr_SetString(UnpicklingError, "LONG pickle has negative "
"byte count");
return -1;