summaryrefslogtreecommitdiffstats
path: root/Modules/_cursesmodule.c
diff options
context:
space:
mode:
authorNadeem Vawda <nadeem.vawda@gmail.com>2011-07-31 13:01:11 (GMT)
committerNadeem Vawda <nadeem.vawda@gmail.com>2011-07-31 13:01:11 (GMT)
commit9e2e99097cee234a3be025b968fb7ffff0f05f3e (patch)
tree7b8c1f3d88981a75afdb66b7992555df45be4237 /Modules/_cursesmodule.c
parent4fbff6c631ab134846334607602a8b0f55a23333 (diff)
downloadcpython-9e2e99097cee234a3be025b968fb7ffff0f05f3e.zip
cpython-9e2e99097cee234a3be025b968fb7ffff0f05f3e.tar.gz
cpython-9e2e99097cee234a3be025b968fb7ffff0f05f3e.tar.bz2
Fix build error in _curses module when not using libncursesw.
Code extracted from Victor Stinner's patch for issue #12567.
Diffstat (limited to 'Modules/_cursesmodule.c')
-rw-r--r--Modules/_cursesmodule.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index 9e57cd9..6d72024 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -906,6 +906,7 @@ PyCursesWindow_GetKey(PyCursesWindowObject *self, PyObject *args)
}
}
+#ifdef HAVE_NCURSESW
static PyObject *
PyCursesWindow_Get_WCh(PyCursesWindowObject *self, PyObject *args)
{
@@ -937,6 +938,7 @@ PyCursesWindow_Get_WCh(PyCursesWindowObject *self, PyObject *args)
}
return PyLong_FromLong(rtn);
}
+#endif
static PyObject *
PyCursesWindow_GetStr(PyCursesWindowObject *self, PyObject *args)
@@ -1636,7 +1638,9 @@ static PyMethodDef PyCursesWindow_Methods[] = {
{"getbkgd", (PyCFunction)PyCursesWindow_GetBkgd, METH_NOARGS},
{"getch", (PyCFunction)PyCursesWindow_GetCh, METH_VARARGS},
{"getkey", (PyCFunction)PyCursesWindow_GetKey, METH_VARARGS},
+#ifdef HAVE_NCURSESW
{"get_wch", (PyCFunction)PyCursesWindow_Get_WCh, METH_VARARGS},
+#endif
{"getmaxyx", (PyCFunction)PyCursesWindow_getmaxyx, METH_NOARGS},
{"getparyx", (PyCFunction)PyCursesWindow_getparyx, METH_NOARGS},
{"getstr", (PyCFunction)PyCursesWindow_GetStr, METH_VARARGS},