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
b1c6bdc7
Kaydet (Commit)
b1c6bdc7
authored
Agu 16, 2016
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge 3.4
üst
aa9560c6
432ea4ff
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
2 deletions
+12
-2
test_curses.py
Lib/test/test_curses.py
+2
-0
NEWS
Misc/NEWS
+2
-2
_cursesmodule.c
Modules/_cursesmodule.c
+8
-0
No files found.
Lib/test/test_curses.py
Dosyayı görüntüle @
b1c6bdc7
...
...
@@ -190,6 +190,8 @@ class TestCurses(unittest.TestCase):
self
.
assertRaises
(
ValueError
,
stdscr
.
getstr
,
-
400
)
self
.
assertRaises
(
ValueError
,
stdscr
.
getstr
,
2
,
3
,
-
400
)
self
.
assertRaises
(
ValueError
,
stdscr
.
instr
,
-
2
)
self
.
assertRaises
(
ValueError
,
stdscr
.
instr
,
2
,
3
,
-
2
)
def
test_module_funcs
(
self
):
...
...
Misc/NEWS
Dosyayı görüntüle @
b1c6bdc7
...
...
@@ -37,8 +37,8 @@ Library
-
Issue
#
26750
:
unittest
.
mock
.
create_autospec
()
now
works
properly
for
subclasses
of
property
()
and
other
data
descriptors
.
-
In
the
curses
module
,
raise
an
error
if
window
.
getstr
()
is
passed
a
negative
value
.
-
In
the
curses
module
,
raise
an
error
if
window
.
getstr
()
or
window
.
instr
()
is
passed
a
negative
value
.
-
Issue
#
27760
:
Fix
possible
integer
overflow
in
binascii
.
b2a_qp
.
...
...
Modules/_cursesmodule.c
Dosyayı görüntüle @
b1c6bdc7
...
...
@@ -1393,6 +1393,10 @@ PyCursesWindow_InStr(PyCursesWindowObject *self, PyObject *args)
case
1
:
if
(
!
PyArg_ParseTuple
(
args
,
"i;n"
,
&
n
))
return
NULL
;
if
(
n
<
0
)
{
PyErr_SetString
(
PyExc_ValueError
,
"'n' must be nonnegative"
);
return
NULL
;
}
rtn2
=
winnstr
(
self
->
win
,
rtn
,
Py_MIN
(
n
,
1023
));
break
;
case
2
:
...
...
@@ -1403,6 +1407,10 @@ PyCursesWindow_InStr(PyCursesWindowObject *self, PyObject *args)
case
3
:
if
(
!
PyArg_ParseTuple
(
args
,
"iii;y,x,n"
,
&
y
,
&
x
,
&
n
))
return
NULL
;
if
(
n
<
0
)
{
PyErr_SetString
(
PyExc_ValueError
,
"'n' must be nonnegative"
);
return
NULL
;
}
rtn2
=
mvwinnstr
(
self
->
win
,
y
,
x
,
rtn
,
Py_MIN
(
n
,
1023
));
break
;
default
:
...
...
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