Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
92c8bb3a
Commit
92c8bb3a
authored
Feb 13, 2003
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor assorted cleanups; no semantic changes.
parent
61436489
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
Modules/cPickle.c
Modules/cPickle.c
+16
-10
No files found.
Modules/cPickle.c
View file @
92c8bb3a
...
...
@@ -892,7 +892,8 @@ fast_save_enter(Picklerobject *self, PyObject *obj)
if
(
PyDict_GetItem
(
self
->
fast_memo
,
key
))
{
Py_DECREF
(
key
);
PyErr_Format
(
PyExc_ValueError
,
"fast mode: can't pickle cyclic objects including object type %s at %p"
,
"fast mode: can't pickle cyclic objects "
"including object type %s at %p"
,
obj
->
ob_type
->
tp_name
,
obj
);
self
->
fast_container
=
-
1
;
return
0
;
...
...
@@ -2786,10 +2787,12 @@ get_Pickler(PyObject *self, PyObject *args)
PyObject
*
file
=
NULL
;
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?
/* 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
))
{
PyErr_Clear
();
...
...
@@ -2949,8 +2952,8 @@ find_class(PyObject *py_module_name, PyObject *py_global_name, PyObject *fc)
if
(
fc
)
{
if
(
fc
==
Py_None
)
{
PyErr_SetString
(
UnpicklingError
,
"
Global and instance
pickles are not supported."
);
PyErr_SetString
(
UnpicklingError
,
"Global and instance "
"pickles are not supported."
);
return
NULL
;
}
return
PyObject_CallFunction
(
fc
,
"OO"
,
py_module_name
,
...
...
@@ -3864,7 +3867,8 @@ load_get(Unpicklerobject *self)
if
(
!
value
)
{
PyErr_SetObject
(
BadPickleGet
,
py_str
);
rc
=
-
1
;
}
else
{
}
else
{
PDATA_APPEND
(
self
->
stack
,
value
,
-
1
);
rc
=
0
;
}
...
...
@@ -3891,7 +3895,8 @@ load_binget(Unpicklerobject *self)
if
(
!
value
)
{
PyErr_SetObject
(
BadPickleGet
,
py_key
);
rc
=
-
1
;
}
else
{
}
else
{
PDATA_APPEND
(
self
->
stack
,
value
,
-
1
);
rc
=
0
;
}
...
...
@@ -3927,7 +3932,8 @@ load_long_binget(Unpicklerobject *self)
if
(
!
value
)
{
PyErr_SetObject
(
BadPickleGet
,
py_key
);
rc
=
-
1
;
}
else
{
}
else
{
PDATA_APPEND
(
self
->
stack
,
value
,
-
1
);
rc
=
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment