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
093ce9cd
Kaydet (Commit)
093ce9cd
authored
Ara 16, 2011
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #6695: Full garbage collection runs now clear the freelist of set objects.
Initial patch by Matthias Troffaes.
üst
c144a93e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
2 deletions
+23
-2
set.rst
Doc/c-api/set.rst
+7
-0
setobject.h
Include/setobject.h
+2
-0
NEWS
Misc/NEWS
+3
-0
gcmodule.c
Modules/gcmodule.c
+1
-0
setobject.c
Objects/setobject.c
+10
-2
No files found.
Doc/c-api/set.rst
Dosyayı görüntüle @
093ce9cd
...
...
@@ -157,3 +157,10 @@ subtypes but not for instances of :class:`frozenset` or its subtypes.
.. c:function:: int PySet_Clear(PyObject *set)
Empty an existing set of all elements.
.. c:function:: int PySet_ClearFreeList()
Clear the free list. Return the total number of freed items.
.. versionadded:: 3.3
Include/setobject.h
Dosyayı görüntüle @
093ce9cd
...
...
@@ -99,6 +99,8 @@ PyAPI_FUNC(int) _PySet_NextEntry(PyObject *set, Py_ssize_t *pos, PyObject **key,
PyAPI_FUNC
(
PyObject
*
)
PySet_Pop
(
PyObject
*
set
);
#ifndef Py_LIMITED_API
PyAPI_FUNC
(
int
)
_PySet_Update
(
PyObject
*
set
,
PyObject
*
iterable
);
PyAPI_FUNC
(
int
)
PySet_ClearFreeList
(
void
);
#endif
#ifdef __cplusplus
...
...
Misc/NEWS
Dosyayı görüntüle @
093ce9cd
...
...
@@ -10,6 +10,9 @@ What's New in Python 3.3 Alpha 1?
Core and Builtins
-----------------
- Issue #6695: Full garbage collection runs now clear the freelist of set
objects. Initial patch by Matthias Troffaes.
- Fix OSError.__init__ and OSError.__new__ so that each of them can be
overriden and take additional arguments (followup to issue #12555).
...
...
Modules/gcmodule.c
Dosyayı görüntüle @
093ce9cd
...
...
@@ -764,6 +764,7 @@ clear_freelists(void)
(
void
)
PyFloat_ClearFreeList
();
(
void
)
PyList_ClearFreeList
();
(
void
)
PyDict_ClearFreeList
();
(
void
)
PySet_ClearFreeList
();
}
static
double
...
...
Objects/setobject.c
Dosyayı görüntüle @
093ce9cd
...
...
@@ -1068,9 +1068,10 @@ frozenset_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
return
emptyfrozenset
;
}
void
PySet_
Fini
(
void
)
int
PySet_
ClearFreeList
(
void
)
{
int
freelist_size
=
numfree
;
PySetObject
*
so
;
while
(
numfree
)
{
...
...
@@ -1078,6 +1079,13 @@ PySet_Fini(void)
so
=
free_list
[
numfree
];
PyObject_GC_Del
(
so
);
}
return
freelist_size
;
}
void
PySet_Fini
(
void
)
{
PySet_ClearFreeList
();
Py_CLEAR
(
dummy
);
Py_CLEAR
(
emptyfrozenset
);
}
...
...
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