Annotation of pkgsrc/lang/python35/patches/patch-Modules___cursesmodule.c, revision 1.2

1.2     ! wiz         1: $NetBSD: patch-Modules___cursesmodule.c,v 1.1 2015/12/05 17:12:13 adam Exp $
1.1       adam        2: 
                      3: Ncurses will be used by devel/py-curses and devel/py-cursespanel.
                      4: http://bugs.python.org/issue21457
                      5: 
                      6: --- Modules/_cursesmodule.c.orig       2015-09-13 11:41:24.000000000 +0000
                      7: +++ Modules/_cursesmodule.c
                      8: @@ -486,17 +486,9 @@ Window_NoArg2TupleReturnFunction(getpary
                      9:  
                     10:  Window_OneArgNoReturnFunction(clearok, int, "i;True(1) or False(0)")
                     11:  Window_OneArgNoReturnFunction(idlok, int, "i;True(1) or False(0)")
                     12: -#if defined(__NetBSD__)
                     13: -Window_OneArgNoReturnVoidFunction(keypad, int, "i;True(1) or False(0)")
                     14: -#else
                     15:  Window_OneArgNoReturnFunction(keypad, int, "i;True(1) or False(0)")
                     16: -#endif
                     17:  Window_OneArgNoReturnFunction(leaveok, int, "i;True(1) or False(0)")
                     18: -#if defined(__NetBSD__)
                     19: -Window_OneArgNoReturnVoidFunction(nodelay, int, "i;True(1) or False(0)")
                     20: -#else
                     21:  Window_OneArgNoReturnFunction(nodelay, int, "i;True(1) or False(0)")
                     22: -#endif
                     23:  Window_OneArgNoReturnFunction(notimeout, int, "i;True(1) or False(0)")
                     24:  Window_OneArgNoReturnFunction(scrollok, int, "i;True(1) or False(0)")
                     25:  Window_OneArgNoReturnFunction(winsdelln, int, "i;nlines")
                     26: @@ -1156,11 +1148,7 @@ PyCursesWindow_GetKey(PyCursesWindowObje
                     27:          return Py_BuildValue("C", rtn);
                     28:      } else {
                     29:          const char *knp;
                     30: -#if defined(__NetBSD__)
                     31: -        knp = unctrl(rtn);
                     32: -#else
                     33:          knp = keyname(rtn);
                     34: -#endif
                     35:          return PyUnicode_FromString((knp == NULL) ? "" : knp);
                     36:      }
                     37:  }
                     38: @@ -2595,7 +2583,6 @@ PyCurses_Is_Term_Resized(PyObject *self,
                     39:  }
                     40:  #endif /* HAVE_CURSES_IS_TERM_RESIZED */
                     41:  
                     42: -#if !defined(__NetBSD__)
                     43:  static PyObject *
                     44:  PyCurses_KeyName(PyObject *self, PyObject *args)
                     45:  {
1.2     ! wiz        46: @@ -2614,7 +2601,6 @@ PyCurses_KeyName(PyObject *self, PyObjec
        !            47:  
        !            48:      return PyBytes_FromString((knp == NULL) ? "" : knp);
1.1       adam       49:  }
                     50: -#endif
                     51:  
                     52:  static PyObject *
1.2     ! wiz        53:  PyCurses_KillChar(PyObject *self)
1.1       adam       54: @@ -3228,9 +3214,7 @@ static PyMethodDef PyCurses_methods[] = 
                     55:  #ifdef HAVE_CURSES_IS_TERM_RESIZED
                     56:      {"is_term_resized",     (PyCFunction)PyCurses_Is_Term_Resized, METH_VARARGS},
                     57:  #endif
                     58: -#if !defined(__NetBSD__)
                     59:      {"keyname",             (PyCFunction)PyCurses_KeyName, METH_VARARGS},
                     60: -#endif
                     61:      {"killchar",            (PyCFunction)PyCurses_KillChar, METH_NOARGS},
                     62:      {"longname",            (PyCFunction)PyCurses_longname, METH_NOARGS},
                     63:      {"meta",                (PyCFunction)PyCurses_Meta, METH_VARARGS},
                     64: @@ -3359,9 +3343,7 @@ PyInit__curses(void)
                     65:      SetDictInt("A_DIM",                 A_DIM);
                     66:      SetDictInt("A_BOLD",                A_BOLD);
                     67:      SetDictInt("A_ALTCHARSET",          A_ALTCHARSET);
                     68: -#if !defined(__NetBSD__)
                     69:      SetDictInt("A_INVIS",           A_INVIS);
                     70: -#endif
                     71:      SetDictInt("A_PROTECT",         A_PROTECT);
                     72:      SetDictInt("A_CHARTEXT",        A_CHARTEXT);
                     73:      SetDictInt("A_COLOR",           A_COLOR);
                     74: @@ -3433,7 +3415,6 @@ PyInit__curses(void)
                     75:          int key;
                     76:          char *key_n;
                     77:          char *key_n2;
                     78: -#if !defined(__NetBSD__)
                     79:          for (key=KEY_MIN;key < KEY_MAX; key++) {
                     80:              key_n = (char *)keyname(key);
                     81:              if (key_n == NULL || strcmp(key_n,"UNKNOWN KEY")==0)
                     82: @@ -3461,7 +3442,6 @@ PyInit__curses(void)
                     83:              if (key_n2 != key_n)
                     84:                  PyMem_Free(key_n2);
                     85:          }
                     86: -#endif
                     87:          SetDictInt("KEY_MIN", KEY_MIN);
                     88:          SetDictInt("KEY_MAX", KEY_MAX);
                     89:      }

CVSweb <webmaster@jp.NetBSD.org>