summaryrefslogtreecommitdiffstats
path: root/Modules/_cursesmodule.c
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2000-07-25 12:37:41 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2000-07-25 12:37:41 (GMT)
commitbf680266da23b0b95a03d2b7ea5da493d341a562 (patch)
treef60ba085ef0f62bb45f01dad79b3b39541ed7614 /Modules/_cursesmodule.c
parentc1b4624447636c09429f2c34535d1011ac9ba53b (diff)
downloadcpython-bf680266da23b0b95a03d2b7ea5da493d341a562.zip
cpython-bf680266da23b0b95a03d2b7ea5da493d341a562.tar.gz
cpython-bf680266da23b0b95a03d2b7ea5da493d341a562.tar.bz2
Modified version of patch #100963 from Mark Favas: has_key() is an
ncurses extension, so it's made conditional depending on STRICT_SYSV_CURSES
Diffstat (limited to 'Modules/_cursesmodule.c')
-rw-r--r--Modules/_cursesmodule.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index 1cfb635..82c9be8 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -43,7 +43,7 @@ char *PyCursesVersion = "1.6";
#ifdef __osf__
#define _XOPEN_SOURCE_EXTENDED /* Define macro for OSF/1 */
-#define STRICT_SYSV_CURSES
+#define STRICT_SYSV_CURSES /* Don't use ncurses extensions */
#endif
#ifdef HAVE_NCURSES_H
@@ -53,7 +53,7 @@ char *PyCursesVersion = "1.6";
#endif
#if defined(__sgi__) || defined(__sun__)
-#define STRICT_SYSV_CURSES
+#define STRICT_SYSV_CURSES /* Don't use ncurses extensions */
typedef chtype attr_t; /* No attr_t type is available */
#endif
@@ -1590,7 +1590,7 @@ PyCurses_HalfDelay(PyObject *self, PyObject *args)
return PyCursesCheckERR(halfdelay(tenths), "halfdelay");
}
-#if !defined(__sgi__) && !defined(__sun__)
+#ifndef STRICT_SYSV_CURSES
/* No has_key! */
static PyObject * PyCurses_has_key(PyObject *self, PyObject *args)
{
@@ -1607,7 +1607,7 @@ static PyObject * PyCurses_has_key(PyObject *self, PyObject *args)
Py_INCREF(Py_True);
return Py_True;
}
-#endif
+#endif /* STRICT_SYSV_CURSES */
static PyObject *
PyCurses_Init_Color(PyObject *self, PyObject *args)
@@ -2111,7 +2111,7 @@ static PyMethodDef PyCurses_methods[] = {
{"has_colors", (PyCFunction)PyCurses_has_colors},
{"has_ic", (PyCFunction)PyCurses_has_ic},
{"has_il", (PyCFunction)PyCurses_has_il},
-#if !defined(__sgi__) && !defined(__sun__)
+#ifndef STRICT_SYSV_CURSES
{"has_key", (PyCFunction)PyCurses_has_key},
#endif
{"halfdelay", (PyCFunction)PyCurses_HalfDelay},