Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions Modules/_cursesmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,17 +392,16 @@ _PyCursesStatefulCheckFunction(PyObject *module,
*/

/*
* Return None if 'code' is OK. Otherwise, set an exception
* using curses_set_error() and the remaining arguments, and
* return NULL.
* Return None if 'code' is different from ERR (implementation-defined).
* Otherwise, set an exception using curses_set_error() and the remaining
* arguments, and return NULL.
*/
static PyObject *
curses_check_err(PyObject *module, int code,
const char *curses_funcname,
const char *python_funcname)
{
if (code != ERR) {
assert(code == OK);
Py_RETURN_NONE;
}
curses_set_error(module, curses_funcname, python_funcname);
Expand All @@ -416,7 +415,6 @@ curses_window_check_err(PyCursesWindowObject *win, int code,
const char *python_funcname)
{
if (code != ERR) {
assert(code == OK);
Py_RETURN_NONE;
}
curses_window_set_error(win, curses_funcname, python_funcname);
Expand Down Expand Up @@ -1580,7 +1578,7 @@ _curses_window_derwin_impl(PyCursesWindowObject *self, int group_left_1,
win = derwin(self->win,nlines,ncols,begin_y,begin_x);

if (win == NULL) {
curses_window_set_error(self, "derwin", NULL);
curses_window_set_null_error(self, "derwin", NULL);
return NULL;
}

Expand Down
Loading