Mercurial > cpython-lru_cache-weakref
diff Modules/_cursesmodule.c @ 39195:acf600471369 2.4
[Bug #1471938] Fix build problem on Solaris 8 by conditionalizing the use of mvwgetnstr(); it was conditionalized a few lines below. Fix from Paul Eggert. I also tried out the STRICT_SYSV_CURSES case and am therefore removing the 'untested' comment.
| author | Andrew M. Kuchling <amk@amk.ca> |
|---|---|
| date | Wed, 26 Jul 2006 17:25:53 +0000 |
| parents | 9df39c960bf1 |
| children | e6a4e0678993 |
line wrap: on
line diff
--- a/Modules/_cursesmodule.c Mon Jul 24 12:57:47 2006 +0000 +++ b/Modules/_cursesmodule.c Wed Jul 26 17:25:53 2006 +0000 @@ -43,7 +43,7 @@ del_curterm delscreen dupwin inchnstr inchstr innstr keyok mcprint mvaddchnstr mvaddchstr mvchgat mvcur mvinchnstr mvinchstr mvinnstr mmvwaddchnstr mvwaddchstr mvwchgat - mvwgetnstr mvwinchnstr mvwinchstr mvwinnstr newterm + mvwinchnstr mvwinchstr mvwinnstr newterm resizeterm restartterm ripoffline scr_dump scr_init scr_restore scr_set scrl set_curterm set_term setterm tgetent tgetflag tgetnum tgetstr tgoto timeout tputs @@ -819,14 +819,17 @@ if (!PyArg_ParseTuple(args,"ii;y,x",&y,&x)) return NULL; Py_BEGIN_ALLOW_THREADS +#ifdef STRICT_SYSV_CURSES + rtn2 = wmove(self->win,y,x)==ERR ? ERR : wgetnstr(self->win, rtn, 1023); +#else rtn2 = mvwgetnstr(self->win,y,x,rtn, 1023); +#endif Py_END_ALLOW_THREADS break; case 3: if (!PyArg_ParseTuple(args,"iii;y,x,n", &y, &x, &n)) return NULL; #ifdef STRICT_SYSV_CURSES - /* Untested */ Py_BEGIN_ALLOW_THREADS rtn2 = wmove(self->win,y,x)==ERR ? ERR : wgetnstr(self->win, rtn, MIN(n, 1023)); @@ -838,7 +841,7 @@ #endif break; default: - PyErr_SetString(PyExc_TypeError, "getstr requires 0 to 2 arguments"); + PyErr_SetString(PyExc_TypeError, "getstr requires 0 to 3 arguments"); return NULL; } if (rtn2 == ERR)
