diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2008-01-09 12:27:41 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2008-01-09 12:27:41 (GMT) |
commit | 3eb4aa733a9aab6fa3dcf4fcacbd655a5613757f (patch) | |
tree | c0bf757d04f1710aad8ec5b0adf4b15ee6a16e8f /Modules | |
parent | 3247aa9078705daca988129af2c3692115f929fe (diff) | |
download | cpython-3eb4aa733a9aab6fa3dcf4fcacbd655a5613757f.zip cpython-3eb4aa733a9aab6fa3dcf4fcacbd655a5613757f.tar.gz cpython-3eb4aa733a9aab6fa3dcf4fcacbd655a5613757f.tar.bz2 |
Related to patch #1114: fix another place where attr_t is assumed to be a long
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_cursesmodule.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index d56f3d5..246e871 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -670,25 +670,30 @@ PyCursesWindow_ChgAt(PyCursesWindowObject *self, PyObject *args) int num = -1; short color; attr_t attr = A_NORMAL; + long lattr; int use_xy = FALSE; switch (PyTuple_Size(args)) { case 1: - if (!PyArg_ParseTuple(args,"l;attr", &attr)) + if (!PyArg_ParseTuple(args,"l;attr", &lattr)) return NULL; + attr = lattr; break; case 2: - if (!PyArg_ParseTuple(args,"il;n,attr", &num, &attr)) + if (!PyArg_ParseTuple(args,"il;n,attr", &num, &lattr)) return NULL; + attr = lattr; break; case 3: - if (!PyArg_ParseTuple(args,"iil;int,int,attr", &y, &x, &attr)) + if (!PyArg_ParseTuple(args,"iil;int,int,attr", &y, &x, &lattr)) return NULL; + attr = lattr; use_xy = TRUE; break; case 4: - if (!PyArg_ParseTuple(args,"iiil;int,int,n,attr", &y, &x, &num, &attr)) + if (!PyArg_ParseTuple(args,"iiil;int,int,n,attr", &y, &x, &num, &lattr)) return NULL; + attr = lattr; use_xy = TRUE; break; default: |