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
4e52ca82
Kaydet (Commit)
4e52ca82
authored
Ara 07, 2002
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
A patch from Kevin Jacobs, plugging several leaks discovered when
running the sandbox datetime tests. Bugfix candidate.
üst
61ce0a9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
cPickle.c
Modules/cPickle.c
+10
-5
No files found.
Modules/cPickle.c
Dosyayı görüntüle @
4e52ca82
...
...
@@ -225,10 +225,6 @@ Pdata_popList(Pdata *self, int start)
return
r
;
}
#define PDATA_APPEND_(D,O,ER) { \
if (Pdata_Append(((Pdata*)(D)), O) < 0) return ER; \
}
#define PDATA_APPEND(D,O,ER) { \
if (((Pdata*)(D))->length == ((Pdata*)(D))->size && \
Pdata_grow((Pdata*)(D)) < 0) \
...
...
@@ -897,6 +893,7 @@ fast_save_enter(Picklerobject *self, PyObject *obj)
if
(
key
==
NULL
)
return
0
;
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"
,
obj
->
ob_type
->
tp_name
,
obj
);
...
...
@@ -904,9 +901,11 @@ fast_save_enter(Picklerobject *self, PyObject *obj)
return
0
;
}
if
(
PyDict_SetItem
(
self
->
fast_memo
,
key
,
Py_None
)
<
0
)
{
Py_DECREF
(
key
);
self
->
fast_container
=
-
1
;
return
0
;
}
Py_DECREF
(
key
);
}
return
1
;
}
...
...
@@ -919,8 +918,10 @@ fast_save_leave(Picklerobject *self, PyObject *obj)
if
(
key
==
NULL
)
return
0
;
if
(
PyDict_DelItem
(
self
->
fast_memo
,
key
)
<
0
)
{
Py_DECREF
(
key
);
return
0
;
}
Py_DECREF
(
key
);
}
return
1
;
}
...
...
@@ -3115,6 +3116,7 @@ Instance_New(PyObject *cls, PyObject *args)
Py_XDECREF
(
safe
);
return
NULL
;
}
Py_DECREF
(
safe
);
}
if
(
args
==
Py_None
)
{
...
...
@@ -3218,7 +3220,10 @@ load_global(Unpicklerobject *self)
if
(
!
module_name
)
return
-
1
;
if
((
len
=
(
*
self
->
readline_func
)(
self
,
&
s
))
>=
0
)
{
if
(
len
<
2
)
return
bad_readline
();
if
(
len
<
2
)
{
Py_DECREF
(
module_name
);
return
bad_readline
();
}
if
((
class_name
=
PyString_FromStringAndSize
(
s
,
len
-
1
)))
{
class
=
find_class
(
module_name
,
class_name
,
self
->
find_class
);
...
...
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