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
5aa3da64
Kaydet (Commit)
5aa3da64
authored
Şub 13, 2003
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
save(): Reformat tail end just for clarity.
üst
18e36f45
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
cPickle.c
Modules/cPickle.c
+17
-16
No files found.
Modules/cPickle.c
Dosyayı görüntüle @
5aa3da64
...
...
@@ -2455,9 +2455,10 @@ save(Picklerobject *self, PyObject *args, int pers_save)
goto
finally
;
}
if
((
__reduce__
=
PyDict_GetItem
(
dispatch_table
,
(
PyObject
*
)
type
)))
{
assert
(
t
==
NULL
);
/* just a reminder */
__reduce__
=
PyDict_GetItem
(
dispatch_table
,
(
PyObject
*
)
type
);
if
(
__reduce__
!=
NULL
)
{
Py_INCREF
(
__reduce__
);
Py_INCREF
(
args
);
ARG_TUP
(
self
,
args
);
if
(
self
->
arg
)
{
...
...
@@ -2467,16 +2468,14 @@ save(Picklerobject *self, PyObject *args, int pers_save)
if
(
!
t
)
goto
finally
;
}
else
{
PyErr_Clear
();
if
((
__reduce__
=
PyObject_GetAttr
(
args
,
__reduce___str
)))
{
__reduce__
=
PyObject_GetAttr
(
args
,
__reduce___str
);
if
(
__reduce__
==
NULL
)
PyErr_Clear
();
else
{
t
=
PyObject_Call
(
__reduce__
,
empty_tuple
,
NULL
);
if
(
!
t
)
goto
finally
;
}
else
{
PyErr_Clear
();
}
}
if
(
t
)
{
...
...
@@ -2486,21 +2485,22 @@ save(Picklerobject *self, PyObject *args, int pers_save)
}
if
(
!
PyTuple_Check
(
t
))
{
cPickle_ErrFormat
(
PicklingError
,
"Value returned by %s must "
"be a tuple"
,
"O"
,
__reduce__
);
cPickle_ErrFormat
(
PicklingError
,
"Value returned by "
"%s must be a tuple"
,
"O"
,
__reduce__
);
goto
finally
;
}
size
=
PyTuple_Size
(
t
);
if
((
size
!=
3
)
&&
(
size
!=
2
))
{
cPickle_ErrFormat
(
PicklingError
,
"tuple returned by %s must "
"contain only two or three elements"
,
"O"
,
__reduce__
);
if
(
size
!=
3
&&
size
!=
2
)
{
cPickle_ErrFormat
(
PicklingError
,
"tuple returned by "
"%s must contain only two or three elements"
,
"O"
,
__reduce__
);
goto
finally
;
}
callable
=
PyTuple_GET_ITEM
(
t
,
0
);
arg_tup
=
PyTuple_GET_ITEM
(
t
,
1
);
if
(
size
>
2
)
{
...
...
@@ -2510,8 +2510,9 @@ save(Picklerobject *self, PyObject *args, int pers_save)
}
if
(
!
(
PyTuple_Check
(
arg_tup
)
||
arg_tup
==
Py_None
))
{
cPickle_ErrFormat
(
PicklingError
,
"Second element of tuple "
"returned by %s must be a tuple"
,
"O"
,
__reduce__
);
cPickle_ErrFormat
(
PicklingError
,
"Second element of "
"tuple returned by %s must be a tuple"
,
"O"
,
__reduce__
);
goto
finally
;
}
...
...
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