Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
92c8bb3a
Kaydet (Commit)
92c8bb3a
authored
Şub 13, 2003
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Minor assorted cleanups; no semantic changes.
üst
61436489
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
cPickle.c
Modules/cPickle.c
+16
-10
No files found.
Modules/cPickle.c
Dosyayı görüntüle @
92c8bb3a
...
@@ -892,7 +892,8 @@ fast_save_enter(Picklerobject *self, PyObject *obj)
...
@@ -892,7 +892,8 @@ fast_save_enter(Picklerobject *self, PyObject *obj)
if
(
PyDict_GetItem
(
self
->
fast_memo
,
key
))
{
if
(
PyDict_GetItem
(
self
->
fast_memo
,
key
))
{
Py_DECREF
(
key
);
Py_DECREF
(
key
);
PyErr_Format
(
PyExc_ValueError
,
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
);
obj
->
ob_type
->
tp_name
,
obj
);
self
->
fast_container
=
-
1
;
self
->
fast_container
=
-
1
;
return
0
;
return
0
;
...
@@ -2786,10 +2787,12 @@ get_Pickler(PyObject *self, PyObject *args)
...
@@ -2786,10 +2787,12 @@ get_Pickler(PyObject *self, PyObject *args)
PyObject
*
file
=
NULL
;
PyObject
*
file
=
NULL
;
int
proto
=
0
;
int
proto
=
0
;
/* XXX What is this doing? The documented signature is
/* XXX
* XXX Pickler(file, proto=0), but this accepts Pickler() and
* The documented signature is Pickler(file, proto=0), but this
* XXX Pickler(integer) too. The meaning then is clear as mud.
* accepts Pickler() and Pickler(integer) too. The meaning then
* XXX Bug? Feature?
* 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
))
{
if
(
!
PyArg_ParseTuple
(
args
,
"|i:Pickler"
,
&
proto
))
{
PyErr_Clear
();
PyErr_Clear
();
...
@@ -2949,8 +2952,8 @@ find_class(PyObject *py_module_name, PyObject *py_global_name, PyObject *fc)
...
@@ -2949,8 +2952,8 @@ find_class(PyObject *py_module_name, PyObject *py_global_name, PyObject *fc)
if
(
fc
)
{
if
(
fc
)
{
if
(
fc
==
Py_None
)
{
if
(
fc
==
Py_None
)
{
PyErr_SetString
(
UnpicklingError
,
PyErr_SetString
(
UnpicklingError
,
"Global and instance "
"
Global and instance
pickles are not supported."
);
"pickles are not supported."
);
return
NULL
;
return
NULL
;
}
}
return
PyObject_CallFunction
(
fc
,
"OO"
,
py_module_name
,
return
PyObject_CallFunction
(
fc
,
"OO"
,
py_module_name
,
...
@@ -3864,7 +3867,8 @@ load_get(Unpicklerobject *self)
...
@@ -3864,7 +3867,8 @@ load_get(Unpicklerobject *self)
if
(
!
value
)
{
if
(
!
value
)
{
PyErr_SetObject
(
BadPickleGet
,
py_str
);
PyErr_SetObject
(
BadPickleGet
,
py_str
);
rc
=
-
1
;
rc
=
-
1
;
}
else
{
}
else
{
PDATA_APPEND
(
self
->
stack
,
value
,
-
1
);
PDATA_APPEND
(
self
->
stack
,
value
,
-
1
);
rc
=
0
;
rc
=
0
;
}
}
...
@@ -3891,7 +3895,8 @@ load_binget(Unpicklerobject *self)
...
@@ -3891,7 +3895,8 @@ load_binget(Unpicklerobject *self)
if
(
!
value
)
{
if
(
!
value
)
{
PyErr_SetObject
(
BadPickleGet
,
py_key
);
PyErr_SetObject
(
BadPickleGet
,
py_key
);
rc
=
-
1
;
rc
=
-
1
;
}
else
{
}
else
{
PDATA_APPEND
(
self
->
stack
,
value
,
-
1
);
PDATA_APPEND
(
self
->
stack
,
value
,
-
1
);
rc
=
0
;
rc
=
0
;
}
}
...
@@ -3927,7 +3932,8 @@ load_long_binget(Unpicklerobject *self)
...
@@ -3927,7 +3932,8 @@ load_long_binget(Unpicklerobject *self)
if
(
!
value
)
{
if
(
!
value
)
{
PyErr_SetObject
(
BadPickleGet
,
py_key
);
PyErr_SetObject
(
BadPickleGet
,
py_key
);
rc
=
-
1
;
rc
=
-
1
;
}
else
{
}
else
{
PDATA_APPEND
(
self
->
stack
,
value
,
-
1
);
PDATA_APPEND
(
self
->
stack
,
value
,
-
1
);
rc
=
0
;
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