[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.

This commit is contained in:
Andrew M. Kuchling 2006-07-26 17:16:52 +00:00
parent 9298eff5f9
commit 55b0a0eb0d
2 changed files with 8 additions and 2 deletions

View File

@ -42,6 +42,9 @@ Core and builtins
Library Library
------- -------
- Bug #1471938: Fix curses module build problem on Solaris 8; patch by
Paul Eggert.
- Bug #978833: Really close underlying socket in _socketobject.close. - Bug #978833: Really close underlying socket in _socketobject.close.
- Bug #1459963: urllib and urllib2 now normalize HTTP header names correctly - Bug #1459963: urllib and urllib2 now normalize HTTP header names correctly

View File

@ -43,7 +43,7 @@ unsupported functions:
del_curterm delscreen dupwin inchnstr inchstr innstr keyok del_curterm delscreen dupwin inchnstr inchstr innstr keyok
mcprint mvaddchnstr mvaddchstr mvchgat mvcur mvinchnstr mcprint mvaddchnstr mvaddchstr mvchgat mvcur mvinchnstr
mvinchstr mvinnstr mmvwaddchnstr mvwaddchstr mvwchgat mvinchstr mvinnstr mmvwaddchnstr mvwaddchstr mvwchgat
mvwgetnstr mvwinchnstr mvwinchstr mvwinnstr newterm mvwinchnstr mvwinchstr mvwinnstr newterm
restartterm ripoffline scr_dump restartterm ripoffline scr_dump
scr_init scr_restore scr_set scrl set_curterm set_term setterm scr_init scr_restore scr_set scrl set_curterm set_term setterm
tgetent tgetflag tgetnum tgetstr tgoto timeout tputs tgetent tgetflag tgetnum tgetstr tgoto timeout tputs
@ -819,14 +819,17 @@ PyCursesWindow_GetStr(PyCursesWindowObject *self, PyObject *args)
if (!PyArg_ParseTuple(args,"ii;y,x",&y,&x)) if (!PyArg_ParseTuple(args,"ii;y,x",&y,&x))
return NULL; return NULL;
Py_BEGIN_ALLOW_THREADS 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); rtn2 = mvwgetnstr(self->win,y,x,rtn, 1023);
#endif
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS
break; break;
case 3: case 3:
if (!PyArg_ParseTuple(args,"iii;y,x,n", &y, &x, &n)) if (!PyArg_ParseTuple(args,"iii;y,x,n", &y, &x, &n))
return NULL; return NULL;
#ifdef STRICT_SYSV_CURSES #ifdef STRICT_SYSV_CURSES
/* Untested */
Py_BEGIN_ALLOW_THREADS Py_BEGIN_ALLOW_THREADS
rtn2 = wmove(self->win,y,x)==ERR ? ERR : rtn2 = wmove(self->win,y,x)==ERR ? ERR :
wgetnstr(self->win, rtn, MIN(n, 1023)); wgetnstr(self->win, rtn, MIN(n, 1023));