Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1:/tmp/cvs-serv16415 Modified Files: _cursesmodule.c Log Message: Always call tparm with 10 arguments. It seems it's not varargs i more often than it is. In response to bug: [ 641808 ] Portability of Modules/_cursesmodule.c submitted by Nick Mclaren. Index: _cursesmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v retrieving revision 2.70 retrieving revision 2.71 diff -C2 -d -r2.70 -r2.71 *** _cursesmodule.c 6 Nov 2002 14:15:36 -0000 2.70 --- _cursesmodule.c 21 Nov 2002 14:17:51 -0000 2.71 *************** *** 2261,2265 **** char* fmt; char* result = NULL; ! int i1,i2,i3,i4,i5,i6,i7,i8,i9; PyCursesSetupTermCalled; --- 2261,2265 ---- char* fmt; char* result = NULL; ! int i1=0,i2=0,i3=0,i4=0,i5=0,i6=0,i7=0,i8=0,i9=0; PyCursesSetupTermCalled; *************** *** 2270,2316 **** return NULL; } ! ! #if defined(__hpux) || defined(_AIX) ! /* tparm is declared with 10 arguments on a few platforms ! (HP-UX, AIX). If this proves to be a problem on other ! platforms as well, perhaps an autoconf test should be ! added to determine whether tparm can be called with a ! variable number of arguments. Perhaps the other arguments ! should be initialized in this case also. */ result = tparm(fmt,i1,i2,i3,i4,i5,i6,i7,i8,i9); ! #else ! switch (PyTuple_GET_SIZE(args)) { ! case 1: ! result = tparm(fmt); ! break; ! case 2: ! result = tparm(fmt,i1); ! break; ! case 3: ! result = tparm(fmt,i1,i2); ! break; ! case 4: ! result = tparm(fmt,i1,i2,i3); ! break; ! case 5: ! result = tparm(fmt,i1,i2,i3,i4); ! break; ! case 6: ! result = tparm(fmt,i1,i2,i3,i4,i5); ! break; ! case 7: ! result = tparm(fmt,i1,i2,i3,i4,i5,i6); ! break; ! case 8: ! result = tparm(fmt,i1,i2,i3,i4,i5,i6,i7); ! break; ! case 9: ! result = tparm(fmt,i1,i2,i3,i4,i5,i6,i7,i8); ! break; ! case 10: ! result = tparm(fmt,i1,i2,i3,i4,i5,i6,i7,i8,i9); ! break; ! } ! #endif /* defined(__hpux) || defined(_AIX) */ return PyString_FromString(result); } --- 2270,2276 ---- return NULL; } ! result = tparm(fmt,i1,i2,i3,i4,i5,i6,i7,i8,i9); ! return PyString_FromString(result); }
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4