[Python-checkins] python/dist/src/Modules cPickle.c,2.134,2.135
tim_one@users.sourceforge.net
tim_one@users.sourceforge.net
Thu, 13 Feb 2003 15:00:34 -0800
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv20672/python/Modules
Modified Files:
cPickle.c
Log Message:
Minor assorted cleanups; no semantic changes.
Index: cPickle.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v
retrieving revision 2.134
retrieving revision 2.135
diff -C2 -d -r2.134 -r2.135
*** cPickle.c 13 Feb 2003 22:17:05 -0000 2.134
--- cPickle.c 13 Feb 2003 23:00:26 -0000 2.135
***************
*** 893,897 ****
Py_DECREF(key);
PyErr_Format(PyExc_ValueError,
! "fast mode: can't pickle cyclic objects including object type %s at %p",
obj->ob_type->tp_name, obj);
self->fast_container = -1;
--- 893,898 ----
Py_DECREF(key);
PyErr_Format(PyExc_ValueError,
! "fast mode: can't pickle cyclic objects "
! "including object type %s at %p",
obj->ob_type->tp_name, obj);
self->fast_container = -1;
***************
*** 2787,2794 ****
int proto = 0;
! /* XXX What is this doing? The documented signature is
! * XXX Pickler(file, proto=0), but this accepts Pickler() and
! * XXX Pickler(integer) too. The meaning then is clear as mud.
! * XXX Bug? Feature?
*/
if (!PyArg_ParseTuple(args, "|i:Pickler", &proto)) {
--- 2788,2797 ----
int proto = 0;
! /* XXX
! * The documented signature is Pickler(file, proto=0), but this
! * accepts Pickler() and Pickler(integer) too. The meaning then
! * is clear as mud, undocumented, and not supported by pickle.py.
! * I'm told Zope uses this, but I haven't traced into this code
! * far enough to figure out what it means.
*/
if (!PyArg_ParseTuple(args, "|i:Pickler", &proto)) {
***************
*** 2950,2955 ****
if (fc) {
if (fc==Py_None) {
! PyErr_SetString(UnpicklingError,
! "Global and instance pickles are not supported.");
return NULL;
}
--- 2953,2958 ----
if (fc) {
if (fc==Py_None) {
! PyErr_SetString(UnpicklingError, "Global and instance "
! "pickles are not supported.");
return NULL;
}
***************
*** 3865,3869 ****
PyErr_SetObject(BadPickleGet, py_str);
rc = -1;
! } else {
PDATA_APPEND(self->stack, value, -1);
rc = 0;
--- 3868,3873 ----
PyErr_SetObject(BadPickleGet, py_str);
rc = -1;
! }
! else {
PDATA_APPEND(self->stack, value, -1);
rc = 0;
***************
*** 3892,3896 ****
PyErr_SetObject(BadPickleGet, py_key);
rc = -1;
! } else {
PDATA_APPEND(self->stack, value, -1);
rc = 0;
--- 3896,3901 ----
PyErr_SetObject(BadPickleGet, py_key);
rc = -1;
! }
! else {
PDATA_APPEND(self->stack, value, -1);
rc = 0;
***************
*** 3928,3932 ****
PyErr_SetObject(BadPickleGet, py_key);
rc = -1;
! } else {
PDATA_APPEND(self->stack, value, -1);
rc = 0;
--- 3933,3938 ----
PyErr_SetObject(BadPickleGet, py_key);
rc = -1;
! }
! else {
PDATA_APPEND(self->stack, value, -1);
rc = 0;