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
8a2a902f
Kaydet (Commit)
8a2a902f
authored
Haz 15, 2013
tarafından
Andrew Kuchling
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge with 3.3
üst
f15a59fd
53e5ea79
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
test_curses.py
Lib/test/test_curses.py
+13
-0
NEWS
Misc/NEWS
+3
-0
_curses_panel.c
Modules/_curses_panel.c
+4
-0
No files found.
Lib/test/test_curses.py
Dosyayı görüntüle @
8a2a902f
...
...
@@ -252,6 +252,18 @@ def test_userptr_without_set(stdscr):
except
curses
.
panel
.
error
:
pass
def
test_userptr_memory_leak
(
stdscr
):
w
=
curses
.
newwin
(
10
,
10
)
p
=
curses
.
panel
.
new_panel
(
w
)
obj
=
object
()
nrefs
=
sys
.
getrefcount
(
obj
)
for
i
in
range
(
100
):
p
.
set_userptr
(
obj
)
p
.
set_userptr
(
None
)
if
sys
.
getrefcount
(
obj
)
!=
nrefs
:
raise
RuntimeError
(
"set_userptr leaked references"
)
def
test_resize_term
(
stdscr
):
if
hasattr
(
curses
,
'resizeterm'
):
lines
,
cols
=
curses
.
LINES
,
curses
.
COLS
...
...
@@ -317,6 +329,7 @@ def main(stdscr):
module_funcs
(
stdscr
)
window_funcs
(
stdscr
)
test_userptr_without_set
(
stdscr
)
test_userptr_memory_leak
(
stdscr
)
test_resize_term
(
stdscr
)
test_issue6243
(
stdscr
)
test_unget_wch
(
stdscr
)
...
...
Misc/NEWS
Dosyayı görüntüle @
8a2a902f
...
...
@@ -383,6 +383,9 @@ Library
the default for linking if LDSHARED is not also overriden. This restores
Distutils behavior introduced in 3.2.3 and inadvertently dropped in 3.3.0.
- Issue #18113: Fixed a refcount leak in the curses.panel module'
s
set_userptr
()
method
.
Reported
by
Atsuo
Ishimoto
.
-
Implement
PEP
443
"Single-dispatch generic functions"
.
-
Implement
PEP
435
"Adding an Enum type to the Python standard library"
.
...
...
Modules/_curses_panel.c
Dosyayı görüntüle @
8a2a902f
...
...
@@ -322,6 +322,10 @@ PyCursesPanel_replace_panel(PyCursesPanelObject *self, PyObject *args)
static
PyObject
*
PyCursesPanel_set_panel_userptr
(
PyCursesPanelObject
*
self
,
PyObject
*
obj
)
{
PyObject
*
oldobj
;
PyCursesInitialised
;
oldobj
=
(
PyObject
*
)
panel_userptr
(
self
->
pan
);
Py_XDECREF
(
oldobj
);
Py_INCREF
(
obj
);
return
PyCursesCheckERR
(
set_panel_userptr
(
self
->
pan
,
(
void
*
)
obj
),
"set_panel_userptr"
);
...
...
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