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
f17a8e9a
Kaydet (Commit)
f17a8e9a
authored
Agu 14, 2016
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge 3.4
üst
9745ee0b
40a77c33
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
0 deletions
+14
-0
test_curses.py
Lib/test/test_curses.py
+3
-0
NEWS
Misc/NEWS
+3
-0
_cursesmodule.c
Modules/_cursesmodule.c
+8
-0
No files found.
Lib/test/test_curses.py
Dosyayı görüntüle @
f17a8e9a
...
@@ -188,6 +188,9 @@ class TestCurses(unittest.TestCase):
...
@@ -188,6 +188,9 @@ class TestCurses(unittest.TestCase):
if
hasattr
(
curses
,
'enclose'
):
if
hasattr
(
curses
,
'enclose'
):
stdscr
.
enclose
()
stdscr
.
enclose
()
self
.
assertRaises
(
ValueError
,
stdscr
.
getstr
,
-
400
)
self
.
assertRaises
(
ValueError
,
stdscr
.
getstr
,
2
,
3
,
-
400
)
def
test_module_funcs
(
self
):
def
test_module_funcs
(
self
):
"Test module-level functions"
"Test module-level functions"
...
...
Misc/NEWS
Dosyayı görüntüle @
f17a8e9a
...
@@ -37,6 +37,9 @@ Library
...
@@ -37,6 +37,9 @@ Library
- Issue #26750: unittest.mock.create_autospec() now works properly for
- Issue #26750: unittest.mock.create_autospec() now works properly for
subclasses of property() and other data descriptors.
subclasses of property() and other data descriptors.
- In the curses module, raise an error if window.getstr() is passed a negative
value.
- Issue #27758: Fix possible integer overflow in the _csv module for large record
- Issue #27758: Fix possible integer overflow in the _csv module for large record
lengths.
lengths.
...
...
Modules/_cursesmodule.c
Dosyayı görüntüle @
f17a8e9a
...
@@ -1221,6 +1221,10 @@ PyCursesWindow_GetStr(PyCursesWindowObject *self, PyObject *args)
...
@@ -1221,6 +1221,10 @@ PyCursesWindow_GetStr(PyCursesWindowObject *self, PyObject *args)
case
1
:
case
1
:
if
(
!
PyArg_ParseTuple
(
args
,
"i;n"
,
&
n
))
if
(
!
PyArg_ParseTuple
(
args
,
"i;n"
,
&
n
))
return
NULL
;
return
NULL
;
if
(
n
<
0
)
{
PyErr_SetString
(
PyExc_ValueError
,
"'n' must be nonnegative"
);
return
NULL
;
}
Py_BEGIN_ALLOW_THREADS
Py_BEGIN_ALLOW_THREADS
rtn2
=
wgetnstr
(
self
->
win
,
rtn
,
Py_MIN
(
n
,
1023
));
rtn2
=
wgetnstr
(
self
->
win
,
rtn
,
Py_MIN
(
n
,
1023
));
Py_END_ALLOW_THREADS
Py_END_ALLOW_THREADS
...
@@ -1239,6 +1243,10 @@ PyCursesWindow_GetStr(PyCursesWindowObject *self, PyObject *args)
...
@@ -1239,6 +1243,10 @@ PyCursesWindow_GetStr(PyCursesWindowObject *self, PyObject *args)
case
3
:
case
3
:
if
(
!
PyArg_ParseTuple
(
args
,
"iii;y,x,n"
,
&
y
,
&
x
,
&
n
))
if
(
!
PyArg_ParseTuple
(
args
,
"iii;y,x,n"
,
&
y
,
&
x
,
&
n
))
return
NULL
;
return
NULL
;
if
(
n
<
0
)
{
PyErr_SetString
(
PyExc_ValueError
,
"'n' must be nonnegative"
);
return
NULL
;
}
#ifdef STRICT_SYSV_CURSES
#ifdef STRICT_SYSV_CURSES
Py_BEGIN_ALLOW_THREADS
Py_BEGIN_ALLOW_THREADS
rtn2
=
wmove
(
self
->
win
,
y
,
x
)
==
ERR
?
ERR
:
rtn2
=
wmove
(
self
->
win
,
y
,
x
)
==
ERR
?
ERR
:
...
...
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