diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2001-01-29 20:31:29 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2001-01-29 20:31:29 (GMT) |
commit | e1c4352f9836801690fe30713478d2f75d5ad656 (patch) | |
tree | 4ad1e5ec6d41ca8644f72336ab8cd38a4d963655 | |
parent | bddd878cd52eac34f00313fb0496e261866bca0d (diff) | |
download | cpython-e1c4352f9836801690fe30713478d2f75d5ad656.zip cpython-e1c4352f9836801690fe30713478d2f75d5ad656.tar.gz cpython-e1c4352f9836801690fe30713478d2f75d5ad656.tar.bz2 |
Rename 'lines' variable to 'nlines' to avoid conflict with a macro defined
in term.h
-rw-r--r-- | Modules/_cursesmodule.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index a49d24f..30285f6 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -1272,15 +1272,15 @@ PyCursesWindow_SubWin(PyCursesWindowObject *self, PyObject *args) static PyObject * PyCursesWindow_Scroll(PyCursesWindowObject *self, PyObject *args) { - int lines; + int nlines; switch(ARG_COUNT(args)) { case 0: return PyCursesCheckERR(scroll(self->win), "scroll"); break; case 1: - if (!PyArg_Parse(args, "i;lines", &lines)) + if (!PyArg_Parse(args, "i;nlines", &nlines)) return NULL; - return PyCursesCheckERR(wscrl(self->win, lines), "scroll"); + return PyCursesCheckERR(wscrl(self->win, nlines), "scroll"); default: PyErr_SetString(PyExc_TypeError, "scroll requires 0 or 1 arguments"); return NULL; @@ -1747,7 +1747,7 @@ static PyObject * PyCurses_InitScr(PyObject *self, PyObject *args) { WINDOW *win; - PyObject *lines, *cols; + PyObject *nlines, *cols; if (!PyArg_NoArgs(args)) return NULL; @@ -1831,9 +1831,9 @@ PyCurses_InitScr(PyObject *self, PyObject *args) SetDictInt("ACS_STERLING", (ACS_STERLING)); #endif - lines = PyInt_FromLong((long) LINES); - PyDict_SetItemString(ModDict, "LINES", lines); - Py_DECREF(lines); + nlines = PyInt_FromLong((long) LINES); + PyDict_SetItemString(ModDict, "LINES", nlines); + Py_DECREF(nlines); cols = PyInt_FromLong((long) COLS); PyDict_SetItemString(ModDict, "COLS", cols); Py_DECREF(cols); |