summaryrefslogtreecommitdiffstats
path: root/Modules/_cursesmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-03-25 00:51:58 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-03-25 00:51:58 (GMT)
commit53ff86ea5f0ed27f5eb5b966faf59dac298d6672 (patch)
tree38099f3cd794760f8fbbba800aad9757e5f75904 /Modules/_cursesmodule.c
parent6cbf90fc0fd552ec7689e5a885b278c05aa866ae (diff)
downloadcpython-53ff86ea5f0ed27f5eb5b966faf59dac298d6672.zip
cpython-53ff86ea5f0ed27f5eb5b966faf59dac298d6672.tar.gz
cpython-53ff86ea5f0ed27f5eb5b966faf59dac298d6672.tar.bz2
Fix _curses.tiget*() functions: deny None to avoid a crash.
Fix the following calls: _curses.tigetflag(None), _curses.tigetnum(None), _curses.tigetstr(None).
Diffstat (limited to 'Modules/_cursesmodule.c')
-rw-r--r--Modules/_cursesmodule.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index 37ba95d..430ab17 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -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 );