--- Python-2.7.12/Modules/_cursesmodule.c 2016-06-25 14:49:31.000000000 -0700 +++ Python-2.7.12/Modules/_cursesmodule.c~ 2016-08-20 15:19:47.734238081 -0700 @@ -642,11 +642,14 @@ PyCursesWindow_Box(PyCursesWindowObject *self, PyObject *args) { chtype ch1=0,ch2=0; + long ch1arg = ch1, ch2arg = ch2; switch(PyTuple_Size(args)){ case 0: break; default: - if (!PyArg_ParseTuple(args,"ll;vertint,horint", &ch1, &ch2)) + if (!PyArg_ParseTuple(args,"ll;vertint,horint", &ch1arg, &ch2arg)) return NULL; + ch1 = ch1arg; + ch2 = ch2arg; } box(self->win,ch1,ch2); Py_INCREF(Py_None); @@ -1811,11 +1814,13 @@ MEVENT event; PyCursesInitialised; + long bstate; if (!PyArg_ParseTuple(args, "hiiil", &event.id, &event.x, &event.y, &event.z, - (int *) &event.bstate)) + &bstate)) return NULL; + event.bstate = bstate; return PyCursesCheckERR(ungetmouse(&event), "ungetmouse"); }