mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
merge 3.5
This commit is contained in:
commit
c0654d4e60
3 changed files with 14 additions and 0 deletions
|
|
@ -1221,6 +1221,10 @@ PyCursesWindow_GetStr(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;
|
||||
}
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
rtn2 = wgetnstr(self->win, rtn, Py_MIN(n, 1023));
|
||||
Py_END_ALLOW_THREADS
|
||||
|
|
@ -1239,6 +1243,10 @@ PyCursesWindow_GetStr(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;
|
||||
}
|
||||
#ifdef STRICT_SYSV_CURSES
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
rtn2 = wmove(self->win,y,x)==ERR ? ERR :
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue