Rename 'lines' variable to 'nlines' to avoid conflict with a macro defined
in term.h
This commit is contained in:
parent
bddd878cd5
commit
e1c4352f98
|
@ -1272,15 +1272,15 @@ PyCursesWindow_SubWin(PyCursesWindowObject *self, PyObject *args)
|
||||||
static PyObject *
|
static PyObject *
|
||||||
PyCursesWindow_Scroll(PyCursesWindowObject *self, PyObject *args)
|
PyCursesWindow_Scroll(PyCursesWindowObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
int lines;
|
int nlines;
|
||||||
switch(ARG_COUNT(args)) {
|
switch(ARG_COUNT(args)) {
|
||||||
case 0:
|
case 0:
|
||||||
return PyCursesCheckERR(scroll(self->win), "scroll");
|
return PyCursesCheckERR(scroll(self->win), "scroll");
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (!PyArg_Parse(args, "i;lines", &lines))
|
if (!PyArg_Parse(args, "i;nlines", &nlines))
|
||||||
return NULL;
|
return NULL;
|
||||||
return PyCursesCheckERR(wscrl(self->win, lines), "scroll");
|
return PyCursesCheckERR(wscrl(self->win, nlines), "scroll");
|
||||||
default:
|
default:
|
||||||
PyErr_SetString(PyExc_TypeError, "scroll requires 0 or 1 arguments");
|
PyErr_SetString(PyExc_TypeError, "scroll requires 0 or 1 arguments");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -1747,7 +1747,7 @@ static PyObject *
|
||||||
PyCurses_InitScr(PyObject *self, PyObject *args)
|
PyCurses_InitScr(PyObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
WINDOW *win;
|
WINDOW *win;
|
||||||
PyObject *lines, *cols;
|
PyObject *nlines, *cols;
|
||||||
|
|
||||||
if (!PyArg_NoArgs(args)) return NULL;
|
if (!PyArg_NoArgs(args)) return NULL;
|
||||||
|
|
||||||
|
@ -1831,9 +1831,9 @@ PyCurses_InitScr(PyObject *self, PyObject *args)
|
||||||
SetDictInt("ACS_STERLING", (ACS_STERLING));
|
SetDictInt("ACS_STERLING", (ACS_STERLING));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
lines = PyInt_FromLong((long) LINES);
|
nlines = PyInt_FromLong((long) LINES);
|
||||||
PyDict_SetItemString(ModDict, "LINES", lines);
|
PyDict_SetItemString(ModDict, "LINES", nlines);
|
||||||
Py_DECREF(lines);
|
Py_DECREF(nlines);
|
||||||
cols = PyInt_FromLong((long) COLS);
|
cols = PyInt_FromLong((long) COLS);
|
||||||
PyDict_SetItemString(ModDict, "COLS", cols);
|
PyDict_SetItemString(ModDict, "COLS", cols);
|
||||||
Py_DECREF(cols);
|
Py_DECREF(cols);
|
||||||
|
|
Loading…
Reference in New Issue