Skip to content

Commit

Permalink
_cursesmodule.c: Fix is_term_resized() invocation
Browse files Browse the repository at this point in the history
The PDCurses `is_termresized()` function, which is mapped to
`is_term_resized()`, does not take any arguments.

This was overlooked because VC 14.40 and below did not treat the extra
arguments as an error (only a warning was output).

Note that this does not introduce any behavioural changes since the
extra arguments provided to `is_termresized()` was never used in the
first place.

Signed-off-by: Stephanos Ioannidis <[email protected]>
  • Loading branch information
stephanosio committed Oct 3, 2024
1 parent 5dadc2c commit 3e4fa8c
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion py310/_cursesmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3569,7 +3569,7 @@ _curses_is_term_resized_impl(PyObject *module, int nlines, int ncols)
{
PyCursesInitialised;

return PyBool_FromLong(is_term_resized(nlines, ncols));
return PyBool_FromLong(is_term_resized());
}
#endif /* HAVE_CURSES_IS_TERM_RESIZED */

Expand Down
2 changes: 1 addition & 1 deletion py311/_cursesmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3569,7 +3569,7 @@ _curses_is_term_resized_impl(PyObject *module, int nlines, int ncols)
{
PyCursesInitialised;

return PyBool_FromLong(is_term_resized(nlines, ncols));
return PyBool_FromLong(is_term_resized());
}
#endif /* HAVE_CURSES_IS_TERM_RESIZED */

Expand Down
2 changes: 1 addition & 1 deletion py312/_cursesmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3569,7 +3569,7 @@ _curses_is_term_resized_impl(PyObject *module, int nlines, int ncols)
{
PyCursesInitialised;

return PyBool_FromLong(is_term_resized(nlines, ncols));
return PyBool_FromLong(is_term_resized());
}
#endif /* HAVE_CURSES_IS_TERM_RESIZED */

Expand Down
2 changes: 1 addition & 1 deletion py34/_cursesmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2634,7 +2634,7 @@ PyCurses_Is_Term_Resized(PyObject *self, PyObject *args)

if (!PyArg_ParseTuple(args,"ii:is_term_resized", &lines, &columns))
return NULL;
result = is_term_resized(lines, columns);
result = is_term_resized();
if (result == TRUE) {
Py_RETURN_TRUE;
} else {
Expand Down
2 changes: 1 addition & 1 deletion py35/_cursesmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2633,7 +2633,7 @@ PyCurses_Is_Term_Resized(PyObject *self, PyObject *args)

if (!PyArg_ParseTuple(args,"ii:is_term_resized", &lines, &columns))
return NULL;
result = is_term_resized(lines, columns);
result = is_term_resized();
if (result == TRUE) {
Py_RETURN_TRUE;
} else {
Expand Down
2 changes: 1 addition & 1 deletion py36/_cursesmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2633,7 +2633,7 @@ PyCurses_Is_Term_Resized(PyObject *self, PyObject *args)

if (!PyArg_ParseTuple(args,"ii:is_term_resized", &lines, &columns))
return NULL;
result = is_term_resized(lines, columns);
result = is_term_resized();
if (result == TRUE) {
Py_RETURN_TRUE;
} else {
Expand Down
2 changes: 1 addition & 1 deletion py37/_cursesmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2634,7 +2634,7 @@ PyCurses_Is_Term_Resized(PyObject *self, PyObject *args)

if (!PyArg_ParseTuple(args,"ii:is_term_resized", &lines, &columns))
return NULL;
result = is_term_resized(lines, columns);
result = is_term_resized();
if (result == TRUE) {
Py_RETURN_TRUE;
} else {
Expand Down
2 changes: 1 addition & 1 deletion py38/_cursesmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3316,7 +3316,7 @@ _curses_is_term_resized_impl(PyObject *module, int nlines, int ncols)
{
PyCursesInitialised;

return PyBool_FromLong(is_term_resized(nlines, ncols));
return PyBool_FromLong(is_term_resized());
}
#endif /* HAVE_CURSES_IS_TERM_RESIZED */

Expand Down
2 changes: 1 addition & 1 deletion py39/_cursesmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3420,7 +3420,7 @@ _curses_is_term_resized_impl(PyObject *module, int nlines, int ncols)
{
PyCursesInitialised;

return PyBool_FromLong(is_term_resized(nlines, ncols));
return PyBool_FromLong(is_term_resized());
}
#endif /* HAVE_CURSES_IS_TERM_RESIZED */

Expand Down

0 comments on commit 3e4fa8c

Please sign in to comment.