Fix _curses.tiget*() functions: deny None to avoid a crash.

Fix the following calls: _curses.tigetflag(None), _curses.tigetnum(None),
_curses.tigetstr(None).
This commit is contained in:
Victor Stinner 2010-03-25 00:51:58 +00:00
parent 6cbf90fc0f
commit 53ff86ea5f
1 changed files with 3 additions and 3 deletions

View File

@ -2466,7 +2466,7 @@ PyCurses_tigetflag(PyObject *self, PyObject *args)
PyCursesSetupTermCalled;
if (!PyArg_ParseTuple(args, "z", &capname))
if (!PyArg_ParseTuple(args, "s", &capname))
return NULL;
return PyInt_FromLong( (long) tigetflag( capname ) );
@ -2479,7 +2479,7 @@ PyCurses_tigetnum(PyObject *self, PyObject *args)
PyCursesSetupTermCalled;
if (!PyArg_ParseTuple(args, "z", &capname))
if (!PyArg_ParseTuple(args, "s", &capname))
return NULL;
return PyInt_FromLong( (long) tigetnum( capname ) );
@ -2492,7 +2492,7 @@ PyCurses_tigetstr(PyObject *self, PyObject *args)
PyCursesSetupTermCalled;
if (!PyArg_ParseTuple(args, "z", &capname))
if (!PyArg_ParseTuple(args, "s", &capname))
return NULL;
capname = tigetstr( capname );