Kaydet (Commit) 41ff3994 authored tarafından Victor Stinner's avatar Victor Stinner

Merged revisions 79395 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r79395 | victor.stinner | 2010-03-25 01:51:58 +0100 (jeu., 25 mars 2010) | 5 lines

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

  Fix the following calls: _curses.tigetflag(None), _curses.tigetnum(None),
  _curses.tigetstr(None).
........
üst 120c2122
...@@ -2543,7 +2543,7 @@ PyCurses_tigetflag(PyObject *self, PyObject *args) ...@@ -2543,7 +2543,7 @@ PyCurses_tigetflag(PyObject *self, PyObject *args)
PyCursesSetupTermCalled; PyCursesSetupTermCalled;
if (!PyArg_ParseTuple(args, "z", &capname)) if (!PyArg_ParseTuple(args, "s", &capname))
return NULL; return NULL;
return PyLong_FromLong( (long) tigetflag( capname ) ); return PyLong_FromLong( (long) tigetflag( capname ) );
...@@ -2556,7 +2556,7 @@ PyCurses_tigetnum(PyObject *self, PyObject *args) ...@@ -2556,7 +2556,7 @@ PyCurses_tigetnum(PyObject *self, PyObject *args)
PyCursesSetupTermCalled; PyCursesSetupTermCalled;
if (!PyArg_ParseTuple(args, "z", &capname)) if (!PyArg_ParseTuple(args, "s", &capname))
return NULL; return NULL;
return PyLong_FromLong( (long) tigetnum( capname ) ); return PyLong_FromLong( (long) tigetnum( capname ) );
...@@ -2569,7 +2569,7 @@ PyCurses_tigetstr(PyObject *self, PyObject *args) ...@@ -2569,7 +2569,7 @@ PyCurses_tigetstr(PyObject *self, PyObject *args)
PyCursesSetupTermCalled; PyCursesSetupTermCalled;
if (!PyArg_ParseTuple(args, "z", &capname)) if (!PyArg_ParseTuple(args, "s", &capname))
return NULL; return NULL;
capname = tigetstr( capname ); capname = tigetstr( capname );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment