diff options
author | Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com> | 2020-03-03 02:00:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-03 02:00:10 (GMT) |
commit | 4991cf47c487500fdedc34f0a2eb4b7468a67c3c (patch) | |
tree | 21fb11ca1432b0403c8fc4532ed5a5544de86a33 /Modules/_cursesmodule.c | |
parent | 6daa37fd42c5d5300172728e8b4de74fe0b319fc (diff) | |
download | cpython-4991cf47c487500fdedc34f0a2eb4b7468a67c3c.zip cpython-4991cf47c487500fdedc34f0a2eb4b7468a67c3c.tar.gz cpython-4991cf47c487500fdedc34f0a2eb4b7468a67c3c.tar.bz2 |
bpo-39802: Only expose set_escdelay and set_tabsize when curses extensions are activated (GH-18705)
Diffstat (limited to 'Modules/_cursesmodule.c')
-rw-r--r-- | Modules/_cursesmodule.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index 5b29000..ee33107 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -3255,6 +3255,9 @@ _curses_setupterm_impl(PyObject *module, const char *term, int fd) Py_RETURN_NONE; } +#if defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20081102 +// https://invisible-island.net/ncurses/NEWS.html#index-t20080119 + /*[clinic input] _curses.get_escdelay @@ -3334,6 +3337,7 @@ _curses_set_tabsize_impl(PyObject *module, int size) return PyCursesCheckERR(set_tabsize(size), "set_tabsize"); } +#endif /*[clinic input] _curses.intrflush @@ -4508,8 +4512,10 @@ static PyMethodDef PyCurses_methods[] = { _CURSES_RESIZETERM_METHODDEF _CURSES_RESIZE_TERM_METHODDEF _CURSES_SAVETTY_METHODDEF +#if defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20081102 _CURSES_GET_ESCDELAY_METHODDEF _CURSES_SET_ESCDELAY_METHODDEF +#endif _CURSES_GET_TABSIZE_METHODDEF _CURSES_SET_TABSIZE_METHODDEF _CURSES_SETSYX_METHODDEF |