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
b8f6dc85
Kaydet (Commit)
b8f6dc85
authored
Ock 12, 2013
tarafından
Eli Bendersky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #16076: fix refleak in pickling of Element.
Thanks to Ezio Melotti and Daniel Shahaf for the patch.
üst
9895ab46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
_elementtree.c
Modules/_elementtree.c
+5
-11
No files found.
Modules/_elementtree.c
Dosyayı görüntüle @
b8f6dc85
...
...
@@ -859,8 +859,10 @@ element_getstate(ElementObject *self)
PICKLED_ATTRIB
,
self
->
extra
->
attrib
,
PICKLED_TEXT
,
self
->
text
,
PICKLED_TAIL
,
self
->
tail
);
if
(
instancedict
)
if
(
instancedict
)
{
Py_DECREF
(
children
);
return
instancedict
;
}
else
{
for
(
i
=
0
;
i
<
PyList_GET_SIZE
(
children
);
i
++
)
Py_DECREF
(
PyList_GET_ITEM
(
children
,
i
));
...
...
@@ -884,25 +886,17 @@ element_setstate_from_attributes(ElementObject *self,
PyErr_SetString
(
PyExc_TypeError
,
"tag may not be NULL"
);
return
NULL
;
}
if
(
!
text
)
{
Py_INCREF
(
Py_None
);
text
=
Py_None
;
}
if
(
!
tail
)
{
Py_INCREF
(
Py_None
);
tail
=
Py_None
;
}
Py_CLEAR
(
self
->
tag
);
self
->
tag
=
tag
;
Py_INCREF
(
self
->
tag
);
Py_CLEAR
(
self
->
text
);
self
->
text
=
text
;
self
->
text
=
text
?
text
:
Py_None
;
Py_INCREF
(
self
->
text
);
Py_CLEAR
(
self
->
tail
);
self
->
tail
=
tail
;
self
->
tail
=
tail
?
tail
:
Py_None
;
Py_INCREF
(
self
->
tail
);
/* Handle ATTRIB and CHILDREN. */
...
...
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