diff options
Diffstat (limited to 'Modules/clinic/_cursesmodule.c.h')
-rw-r--r-- | Modules/clinic/_cursesmodule.c.h | 287 |
1 files changed, 1 insertions, 286 deletions
diff --git a/Modules/clinic/_cursesmodule.c.h b/Modules/clinic/_cursesmodule.c.h index 50d7f21..f686ded 100644 --- a/Modules/clinic/_cursesmodule.c.h +++ b/Modules/clinic/_cursesmodule.c.h @@ -252,11 +252,6 @@ _curses_window_bkgd(PyCursesWindowObject *self, PyObject *const *args, Py_ssize_ if (nargs < 2) { goto skip_optional; } - if (PyFloat_Check(args[1])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } attr = PyLong_AsLong(args[1]); if (attr == -1 && PyErr_Occurred()) { goto exit; @@ -286,11 +281,6 @@ _curses_window_attroff(PyCursesWindowObject *self, PyObject *arg) PyObject *return_value = NULL; long attr; - if (PyFloat_Check(arg)) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } attr = PyLong_AsLong(arg); if (attr == -1 && PyErr_Occurred()) { goto exit; @@ -319,11 +309,6 @@ _curses_window_attron(PyCursesWindowObject *self, PyObject *arg) PyObject *return_value = NULL; long attr; - if (PyFloat_Check(arg)) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } attr = PyLong_AsLong(arg); if (attr == -1 && PyErr_Occurred()) { goto exit; @@ -352,11 +337,6 @@ _curses_window_attrset(PyCursesWindowObject *self, PyObject *arg) PyObject *return_value = NULL; long attr; - if (PyFloat_Check(arg)) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } attr = PyLong_AsLong(arg); if (attr == -1 && PyErr_Occurred()) { goto exit; @@ -399,11 +379,6 @@ _curses_window_bkgdset(PyCursesWindowObject *self, PyObject *const *args, Py_ssi if (nargs < 2) { goto skip_optional; } - if (PyFloat_Check(args[1])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } attr = PyLong_AsLong(args[1]); if (attr == -1 && PyErr_Occurred()) { goto exit; @@ -687,11 +662,6 @@ _curses_window_echochar(PyCursesWindowObject *self, PyObject *const *args, Py_ss if (nargs < 2) { goto skip_optional; } - if (PyFloat_Check(args[1])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } attr = PyLong_AsLong(args[1]); if (attr == -1 && PyErr_Occurred()) { goto exit; @@ -733,20 +703,10 @@ _curses_window_enclose(PyCursesWindowObject *self, PyObject *const *args, Py_ssi if (!_PyArg_CheckPositional("enclose", nargs, 2, 2)) { goto exit; } - if (PyFloat_Check(args[0])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } y = _PyLong_AsInt(args[0]); if (y == -1 && PyErr_Occurred()) { goto exit; } - if (PyFloat_Check(args[1])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } x = _PyLong_AsInt(args[1]); if (x == -1 && PyErr_Occurred()) { goto exit; @@ -1303,11 +1263,6 @@ _curses_window_is_linetouched(PyCursesWindowObject *self, PyObject *arg) PyObject *return_value = NULL; int line; - if (PyFloat_Check(arg)) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } line = _PyLong_AsInt(arg); if (line == -1 && PyErr_Occurred()) { goto exit; @@ -1552,20 +1507,10 @@ _curses_window_redrawln(PyCursesWindowObject *self, PyObject *const *args, Py_ss if (!_PyArg_CheckPositional("redrawln", nargs, 2, 2)) { goto exit; } - if (PyFloat_Check(args[0])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } beg = _PyLong_AsInt(args[0]); if (beg == -1 && PyErr_Occurred()) { goto exit; } - if (PyFloat_Check(args[1])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } num = _PyLong_AsInt(args[1]); if (num == -1 && PyErr_Occurred()) { goto exit; @@ -1661,20 +1606,10 @@ _curses_window_setscrreg(PyCursesWindowObject *self, PyObject *const *args, Py_s if (!_PyArg_CheckPositional("setscrreg", nargs, 2, 2)) { goto exit; } - if (PyFloat_Check(args[0])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } top = _PyLong_AsInt(args[0]); if (top == -1 && PyErr_Occurred()) { goto exit; } - if (PyFloat_Check(args[1])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } bottom = _PyLong_AsInt(args[1]); if (bottom == -1 && PyErr_Occurred()) { goto exit; @@ -2005,11 +1940,6 @@ _curses_cbreak(PyObject *module, PyObject *const *args, Py_ssize_t nargs) if (nargs < 1) { goto skip_optional; } - if (PyFloat_Check(args[0])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } flag = _PyLong_AsInt(args[0]); if (flag == -1 && PyErr_Occurred()) { goto exit; @@ -2045,11 +1975,6 @@ _curses_color_content(PyObject *module, PyObject *arg) PyObject *return_value = NULL; short color_number; - if (PyFloat_Check(arg)) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } { long ival = PyLong_AsLong(arg); if (ival == -1 && PyErr_Occurred()) { @@ -2099,11 +2024,6 @@ _curses_color_pair(PyObject *module, PyObject *arg) PyObject *return_value = NULL; short color_number; - if (PyFloat_Check(arg)) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } { long ival = PyLong_AsLong(arg); if (ival == -1 && PyErr_Occurred()) { @@ -2155,11 +2075,6 @@ _curses_curs_set(PyObject *module, PyObject *arg) PyObject *return_value = NULL; int visibility; - if (PyFloat_Check(arg)) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } visibility = _PyLong_AsInt(arg); if (visibility == -1 && PyErr_Occurred()) { goto exit; @@ -2235,11 +2150,6 @@ _curses_delay_output(PyObject *module, PyObject *arg) PyObject *return_value = NULL; int ms; - if (PyFloat_Check(arg)) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } ms = _PyLong_AsInt(arg); if (ms == -1 && PyErr_Occurred()) { goto exit; @@ -2297,11 +2207,6 @@ _curses_echo(PyObject *module, PyObject *const *args, Py_ssize_t nargs) if (nargs < 1) { goto skip_optional; } - if (PyFloat_Check(args[0])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } flag = _PyLong_AsInt(args[0]); if (flag == -1 && PyErr_Occurred()) { goto exit; @@ -2469,11 +2374,6 @@ _curses_ungetmouse(PyObject *module, PyObject *const *args, Py_ssize_t nargs) if (!_PyArg_CheckPositional("ungetmouse", nargs, 5, 5)) { goto exit; } - if (PyFloat_Check(args[0])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } { long ival = PyLong_AsLong(args[0]); if (ival == -1 && PyErr_Occurred()) { @@ -2493,29 +2393,14 @@ _curses_ungetmouse(PyObject *module, PyObject *const *args, Py_ssize_t nargs) id = (short) ival; } } - if (PyFloat_Check(args[1])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } x = _PyLong_AsInt(args[1]); if (x == -1 && PyErr_Occurred()) { goto exit; } - if (PyFloat_Check(args[2])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } y = _PyLong_AsInt(args[2]); if (y == -1 && PyErr_Occurred()) { goto exit; } - if (PyFloat_Check(args[3])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } z = _PyLong_AsInt(args[3]); if (z == -1 && PyErr_Occurred()) { goto exit; @@ -2568,11 +2453,6 @@ _curses_halfdelay(PyObject *module, PyObject *arg) PyObject *return_value = NULL; unsigned char tenths; - if (PyFloat_Check(arg)) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } { long ival = PyLong_AsLong(arg); if (ival == -1 && PyErr_Occurred()) { @@ -2675,11 +2555,6 @@ _curses_has_key(PyObject *module, PyObject *arg) PyObject *return_value = NULL; int key; - if (PyFloat_Check(arg)) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } key = _PyLong_AsInt(arg); if (key == -1 && PyErr_Occurred()) { goto exit; @@ -2730,11 +2605,6 @@ _curses_init_color(PyObject *module, PyObject *const *args, Py_ssize_t nargs) if (!_PyArg_CheckPositional("init_color", nargs, 4, 4)) { goto exit; } - if (PyFloat_Check(args[0])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } { long ival = PyLong_AsLong(args[0]); if (ival == -1 && PyErr_Occurred()) { @@ -2754,11 +2624,6 @@ _curses_init_color(PyObject *module, PyObject *const *args, Py_ssize_t nargs) color_number = (short) ival; } } - if (PyFloat_Check(args[1])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } { long ival = PyLong_AsLong(args[1]); if (ival == -1 && PyErr_Occurred()) { @@ -2778,11 +2643,6 @@ _curses_init_color(PyObject *module, PyObject *const *args, Py_ssize_t nargs) r = (short) ival; } } - if (PyFloat_Check(args[2])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } { long ival = PyLong_AsLong(args[2]); if (ival == -1 && PyErr_Occurred()) { @@ -2802,11 +2662,6 @@ _curses_init_color(PyObject *module, PyObject *const *args, Py_ssize_t nargs) g = (short) ival; } } - if (PyFloat_Check(args[3])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } { long ival = PyLong_AsLong(args[3]); if (ival == -1 && PyErr_Occurred()) { @@ -2866,11 +2721,6 @@ _curses_init_pair(PyObject *module, PyObject *const *args, Py_ssize_t nargs) if (!_PyArg_CheckPositional("init_pair", nargs, 3, 3)) { goto exit; } - if (PyFloat_Check(args[0])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } { long ival = PyLong_AsLong(args[0]); if (ival == -1 && PyErr_Occurred()) { @@ -2890,11 +2740,6 @@ _curses_init_pair(PyObject *module, PyObject *const *args, Py_ssize_t nargs) pair_number = (short) ival; } } - if (PyFloat_Check(args[1])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } { long ival = PyLong_AsLong(args[1]); if (ival == -1 && PyErr_Occurred()) { @@ -2914,11 +2759,6 @@ _curses_init_pair(PyObject *module, PyObject *const *args, Py_ssize_t nargs) fg = (short) ival; } } - if (PyFloat_Check(args[2])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } { long ival = PyLong_AsLong(args[2]); if (ival == -1 && PyErr_Occurred()) { @@ -3024,11 +2864,6 @@ _curses_setupterm(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO goto skip_optional_pos; } } - if (PyFloat_Check(args[1])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } fd = _PyLong_AsInt(args[1]); if (fd == -1 && PyErr_Occurred()) { goto exit; @@ -3093,11 +2928,6 @@ _curses_set_escdelay(PyObject *module, PyObject *arg) PyObject *return_value = NULL; int ms; - if (PyFloat_Check(arg)) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } ms = _PyLong_AsInt(arg); if (ms == -1 && PyErr_Occurred()) { goto exit; @@ -3161,11 +2991,6 @@ _curses_set_tabsize(PyObject *module, PyObject *arg) PyObject *return_value = NULL; int size; - if (PyFloat_Check(arg)) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } size = _PyLong_AsInt(arg); if (size == -1 && PyErr_Occurred()) { goto exit; @@ -3195,11 +3020,6 @@ _curses_intrflush(PyObject *module, PyObject *arg) PyObject *return_value = NULL; int flag; - if (PyFloat_Check(arg)) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } flag = _PyLong_AsInt(arg); if (flag == -1 && PyErr_Occurred()) { goto exit; @@ -3257,20 +3077,10 @@ _curses_is_term_resized(PyObject *module, PyObject *const *args, Py_ssize_t narg if (!_PyArg_CheckPositional("is_term_resized", nargs, 2, 2)) { goto exit; } - if (PyFloat_Check(args[0])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } nlines = _PyLong_AsInt(args[0]); if (nlines == -1 && PyErr_Occurred()) { goto exit; } - if (PyFloat_Check(args[1])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } ncols = _PyLong_AsInt(args[1]); if (ncols == -1 && PyErr_Occurred()) { goto exit; @@ -3304,11 +3114,6 @@ _curses_keyname(PyObject *module, PyObject *arg) PyObject *return_value = NULL; int key; - if (PyFloat_Check(arg)) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } key = _PyLong_AsInt(arg); if (key == -1 && PyErr_Occurred()) { goto exit; @@ -3379,11 +3184,6 @@ _curses_meta(PyObject *module, PyObject *arg) PyObject *return_value = NULL; int yes; - if (PyFloat_Check(arg)) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } yes = _PyLong_AsInt(arg); if (yes == -1 && PyErr_Occurred()) { goto exit; @@ -3421,11 +3221,6 @@ _curses_mouseinterval(PyObject *module, PyObject *arg) PyObject *return_value = NULL; int interval; - if (PyFloat_Check(arg)) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } interval = _PyLong_AsInt(arg); if (interval == -1 && PyErr_Occurred()) { goto exit; @@ -3497,11 +3292,6 @@ _curses_napms(PyObject *module, PyObject *arg) PyObject *return_value = NULL; int ms; - if (PyFloat_Check(arg)) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } ms = _PyLong_AsInt(arg); if (ms == -1 && PyErr_Occurred()) { goto exit; @@ -3539,20 +3329,10 @@ _curses_newpad(PyObject *module, PyObject *const *args, Py_ssize_t nargs) if (!_PyArg_CheckPositional("newpad", nargs, 2, 2)) { goto exit; } - if (PyFloat_Check(args[0])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } nlines = _PyLong_AsInt(args[0]); if (nlines == -1 && PyErr_Occurred()) { goto exit; } - if (PyFloat_Check(args[1])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } ncols = _PyLong_AsInt(args[1]); if (ncols == -1 && PyErr_Occurred()) { goto exit; @@ -3648,11 +3428,6 @@ _curses_nl(PyObject *module, PyObject *const *args, Py_ssize_t nargs) if (nargs < 1) { goto skip_optional; } - if (PyFloat_Check(args[0])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } flag = _PyLong_AsInt(args[0]); if (flag == -1 && PyErr_Occurred()) { goto exit; @@ -3787,11 +3562,6 @@ _curses_pair_content(PyObject *module, PyObject *arg) PyObject *return_value = NULL; short pair_number; - if (PyFloat_Check(arg)) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } { long ival = PyLong_AsLong(arg); if (ival == -1 && PyErr_Occurred()) { @@ -3837,11 +3607,6 @@ _curses_pair_number(PyObject *module, PyObject *arg) PyObject *return_value = NULL; int attr; - if (PyFloat_Check(arg)) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } attr = _PyLong_AsInt(arg); if (attr == -1 && PyErr_Occurred()) { goto exit; @@ -3911,11 +3676,6 @@ _curses_qiflush(PyObject *module, PyObject *const *args, Py_ssize_t nargs) if (nargs < 1) { goto skip_optional; } - if (PyFloat_Check(args[0])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } flag = _PyLong_AsInt(args[0]); if (flag == -1 && PyErr_Occurred()) { goto exit; @@ -3979,11 +3739,6 @@ _curses_raw(PyObject *module, PyObject *const *args, Py_ssize_t nargs) if (nargs < 1) { goto skip_optional; } - if (PyFloat_Check(args[0])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } flag = _PyLong_AsInt(args[0]); if (flag == -1 && PyErr_Occurred()) { goto exit; @@ -4081,20 +3836,10 @@ _curses_resizeterm(PyObject *module, PyObject *const *args, Py_ssize_t nargs) if (!_PyArg_CheckPositional("resizeterm", nargs, 2, 2)) { goto exit; } - if (PyFloat_Check(args[0])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } nlines = _PyLong_AsInt(args[0]); if (nlines == -1 && PyErr_Occurred()) { goto exit; } - if (PyFloat_Check(args[1])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } ncols = _PyLong_AsInt(args[1]); if (ncols == -1 && PyErr_Occurred()) { goto exit; @@ -4142,20 +3887,10 @@ _curses_resize_term(PyObject *module, PyObject *const *args, Py_ssize_t nargs) if (!_PyArg_CheckPositional("resize_term", nargs, 2, 2)) { goto exit; } - if (PyFloat_Check(args[0])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } nlines = _PyLong_AsInt(args[0]); if (nlines == -1 && PyErr_Occurred()) { goto exit; } - if (PyFloat_Check(args[1])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } ncols = _PyLong_AsInt(args[1]); if (ncols == -1 && PyErr_Occurred()) { goto exit; @@ -4217,20 +3952,10 @@ _curses_setsyx(PyObject *module, PyObject *const *args, Py_ssize_t nargs) if (!_PyArg_CheckPositional("setsyx", nargs, 2, 2)) { goto exit; } - if (PyFloat_Check(args[0])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } y = _PyLong_AsInt(args[0]); if (y == -1 && PyErr_Occurred()) { goto exit; } - if (PyFloat_Check(args[1])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } x = _PyLong_AsInt(args[1]); if (x == -1 && PyErr_Occurred()) { goto exit; @@ -4500,11 +4225,6 @@ _curses_typeahead(PyObject *module, PyObject *arg) PyObject *return_value = NULL; int fd; - if (PyFloat_Check(arg)) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } fd = _PyLong_AsInt(arg); if (fd == -1 && PyErr_Occurred()) { goto exit; @@ -4580,11 +4300,6 @@ _curses_use_env(PyObject *module, PyObject *arg) PyObject *return_value = NULL; int flag; - if (PyFloat_Check(arg)) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } flag = _PyLong_AsInt(arg); if (flag == -1 && PyErr_Occurred()) { goto exit; @@ -4713,4 +4428,4 @@ _curses_use_default_colors(PyObject *module, PyObject *Py_UNUSED(ignored)) #ifndef _CURSES_USE_DEFAULT_COLORS_METHODDEF #define _CURSES_USE_DEFAULT_COLORS_METHODDEF #endif /* !defined(_CURSES_USE_DEFAULT_COLORS_METHODDEF) */ -/*[clinic end generated code: output=b53652f8acafd817 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=478d93f7692385eb input=a9049054013a1b77]*/ |