bpo-39802: Only expose set_escdelay and set_tabsize when curses extensions are activated (GH-18705)

This commit is contained in:
Batuhan Taşkaya 2020-03-03 05:00:10 +03:00 committed by GitHub
parent 6daa37fd42
commit 4991cf47c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 39 additions and 1 deletions

View file

@ -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